mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* call_cfunc.ci: removed.
* insnhelper.ci: added. this function includes all functions that vm insns need. * common.mk: ditto. * insnhelper.h, vm.h, vm.c: move some declaration. * gc.h: remove GC_CHECK() macro because GC.stress is more useful. * compile.c, iseq.c, vm_dump: ditto. * gc.h, thread.c: move a prototype decalaration. * debug.c, debug.h: rename some functions. * compile.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
61fa357622
commit
7980e653e5
15 changed files with 933 additions and 963 deletions
16
vm.h
16
vm.h
|
@ -13,13 +13,21 @@
|
|||
#ifndef _VM_H_INCLUDED_
|
||||
#define _VM_H_INCLUDED_
|
||||
|
||||
|
||||
#if YARVDEBUG > VMDEBUG
|
||||
#undef VMDEBUG
|
||||
#define VMDEBUG YARVDEBUG
|
||||
#endif
|
||||
|
||||
typedef long OFFSET;
|
||||
typedef unsigned long rb_num_t;
|
||||
typedef unsigned long lindex_t;
|
||||
typedef unsigned long dindex_t;
|
||||
typedef rb_num_t GENTRY;
|
||||
|
||||
extern VALUE rb_cEnv;
|
||||
extern VALUE ruby_vm_global_state_version;
|
||||
extern VALUE ruby_vm_redefined_flag;
|
||||
|
||||
|
||||
/**
|
||||
* VM Debug Level
|
||||
|
@ -167,7 +175,6 @@ typedef rb_control_frame_t *
|
|||
#endif /* DISPATCH_DIRECT_THREADED_CODE */
|
||||
|
||||
#define END_INSN(insn) \
|
||||
GC_CHECK(); \
|
||||
DEBUG_END_INSN(); \
|
||||
TC_DISPATCH(insn); \
|
||||
|
||||
|
@ -189,7 +196,6 @@ typedef rb_control_frame_t *
|
|||
case BIN(insn):
|
||||
|
||||
#define END_INSN(insn) \
|
||||
GC_CHECK(); \
|
||||
DEBUG_END_INSN(); \
|
||||
break;
|
||||
|
||||
|
@ -266,9 +272,9 @@ default: \
|
|||
|
||||
/* VM state version */
|
||||
|
||||
#define GET_VM_STATE_VERSION() (vm_global_state_version)
|
||||
#define GET_VM_STATE_VERSION() (ruby_vm_global_state_version)
|
||||
#define INC_VM_STATE_VERSION() \
|
||||
(vm_global_state_version = (vm_global_state_version+1) & 0x8fffffff)
|
||||
(ruby_vm_global_state_version = (ruby_vm_global_state_version+1) & 0x8fffffff)
|
||||
|
||||
#define BOP_PLUS 0x01
|
||||
#define BOP_MINUS 0x02
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue