|
Ruby
1.9.3p448(2013-06-27revision41675)
|
Go to the source code of this file.
Definition at line 106 of file vm_insnhelper.h.
| #define BASIC_OP_UNREDEFINED_P | ( | op | ) | (LIKELY(ruby_vm_redefined_flag[(op)] == 0)) |
Definition at line 188 of file vm_insnhelper.h.
Referenced by opt_eq_func().
| #define CALL_METHOD | ( | num, | |
| blockptr, | |||
| flag, | |||
| id, | |||
| me, | |||
| recv | |||
| ) |
do { \ VALUE v = vm_call_method(th, GET_CFP(), (num), (blockptr), (flag), (id), (me), (recv)); \ if (v == Qundef) { \ RESTORE_REGS(); \ NEXT_INSN(); \ } \ else { \ val = v; \ } \ } while (0)
Definition at line 162 of file vm_insnhelper.h.
| #define CALL_SIMPLE_METHOD | ( | num, | |
| id, | |||
| recv | |||
| ) |
do { \ VALUE klass = CLASS_OF(recv); \ CALL_METHOD((num), 0, 0, (id), vm_method_search((id), klass, ic), (recv)); \ } while (0)
Definition at line 197 of file vm_insnhelper.h.
| #define COPY_CREF | ( | c1, | |
| c2 | |||
| ) |
do { \ NODE *__tmp_c2 = (c2); \ (c1)->nd_clss = __tmp_c2->nd_clss; \ (c1)->nd_visi = __tmp_c2->nd_visi;\ (c1)->nd_next = __tmp_c2->nd_next; \ if (__tmp_c2->flags & NODE_FL_CREF_PUSHED_BY_EVAL) { \ (c1)->flags |= NODE_FL_CREF_PUSHED_BY_EVAL; \ } \ } while (0)
Definition at line 152 of file vm_insnhelper.h.
Referenced by vm_define_method().
| #define DEC_SP | ( | x | ) | (REG_SP -= (USAGE_ANALYSIS_REGISTER_HELPER(1, 1, (x)))) |
Definition at line 122 of file vm_insnhelper.h.
Referenced by vm_call_method().
| #define FIXNUM_2_P | ( | a, | |
| b | |||
| ) | ((a) & (b) & 1) |
Definition at line 187 of file vm_insnhelper.h.
Referenced by opt_eq_func().
| #define GET_BLOCK_PTR | ( | ) |
((rb_block_t *)(GC_GUARDED_PTR_REF(GET_LFP()[0] & \ ((GET_LFP()[0] & 0x02) - 0x02))))
Definition at line 173 of file vm_insnhelper.h.
Referenced by vm_invoke_block().
| #define GET_CFP | ( | ) | (USAGE_ANALYSIS_REGISTER_HELPER(2, 0, REG_CFP)) |
Definition at line 112 of file vm_insnhelper.h.
Referenced by vm_invoke_block(), vm_search_superclass(), and vm_throw().
| #define GET_CONST_INLINE_CACHE | ( | dst | ) | ((IC) * (GET_PC() + (dst) + 2)) |
Definition at line 140 of file vm_insnhelper.h.
| #define GET_CURRENT_INSN | ( | ) | (*GET_PC()) |
Definition at line 104 of file vm_insnhelper.h.
| #define GET_DFP | ( | ) | (USAGE_ANALYSIS_REGISTER_HELPER(4, 0, REG_DFP)) |
Definition at line 115 of file vm_insnhelper.h.
Referenced by vm_throw().
| #define GET_GLOBAL | ( | entry | ) | rb_gvar_get((struct rb_global_entry*)(entry)) |
Definition at line 137 of file vm_insnhelper.h.
Definition at line 129 of file vm_insnhelper.h.
Referenced by vm_invoke_block(), and vm_throw().
| #define GET_LFP | ( | ) | (USAGE_ANALYSIS_REGISTER_HELPER(3, 0, REG_LFP)) |
Definition at line 113 of file vm_insnhelper.h.
Referenced by vm_throw().
| #define GET_OPERAND | ( | n | ) | (GET_PC()[(n)]) |
Definition at line 105 of file vm_insnhelper.h.
| #define GET_PC | ( | ) | (USAGE_ANALYSIS_REGISTER_HELPER(0, 0, REG_PC)) |
Definition at line 102 of file vm_insnhelper.h.
| #define GET_PC_COUNT | ( | ) | (REG_PC - GET_ISEQ()->iseq_encoded) |
Definition at line 108 of file vm_insnhelper.h.
| #define GET_PREV_DFP | ( | dfp | ) | ((VALUE *)((dfp)[0] & ~0x03)) |
Definition at line 135 of file vm_insnhelper.h.
Referenced by vm_get_cref0(), and vm_search_superclass().
| #define GET_SELF | ( | ) | (USAGE_ANALYSIS_REGISTER_HELPER(5, 0, GET_CFP()->self)) |
Definition at line 146 of file vm_insnhelper.h.
| #define GET_SP | ( | ) | (USAGE_ANALYSIS_REGISTER_HELPER(1, 0, REG_SP)) |
Definition at line 119 of file vm_insnhelper.h.
Referenced by vm_invoke_block().
| #define GET_SP_COUNT | ( | ) | (REG_SP - th->stack) |
Definition at line 126 of file vm_insnhelper.h.
| #define GET_TOS | ( | ) | (tos) /* dummy */ |
Definition at line 75 of file vm_insnhelper.h.
| #define GET_VM_STATE_VERSION | ( | ) | (ruby_vm_global_state_version) |
Definition at line 213 of file vm_insnhelper.h.
Referenced by rb_method_entry(), rb_method_entry_get_without_cache(), vm_getivar(), vm_method_search(), and vm_setivar().
| #define HEAP_CLASS_OF | ( | obj | ) | RBASIC(obj)->klass |
Definition at line 189 of file vm_insnhelper.h.
Referenced by opt_eq_func().
| #define INC_SP | ( | x | ) | (REG_SP += (USAGE_ANALYSIS_REGISTER_HELPER(1, 1, (x)))) |
Definition at line 121 of file vm_insnhelper.h.
| #define INC_VM_STATE_VERSION | ( | ) |
do { \ ruby_vm_global_state_version = (ruby_vm_global_state_version + 1); \ if (ruby_vm_global_state_version == 0) vm_clear_all_cache(); \ } while (0)
Definition at line 214 of file vm_insnhelper.h.
Referenced by m_core_undef_method(), rb_vm_change_state(), and vm_define_method().
Definition at line 109 of file vm_insnhelper.h.
Definition at line 72 of file vm_insnhelper.h.
Definition at line 71 of file vm_insnhelper.h.
Referenced by vm_invoke_block(), and vm_method_missing_args().
Definition at line 69 of file vm_insnhelper.h.
| #define REG_A reg_a |
Definition at line 91 of file vm_insnhelper.h.
| #define REG_B reg_b |
Definition at line 92 of file vm_insnhelper.h.
| #define REG_CFP (reg_cfp) |
Definition at line 81 of file vm_insnhelper.h.
Definition at line 85 of file vm_insnhelper.h.
Definition at line 84 of file vm_insnhelper.h.
Definition at line 82 of file vm_insnhelper.h.
Definition at line 83 of file vm_insnhelper.h.
| #define RESTORE_REGS | ( | ) |
do { \ REG_CFP = th->cfp; \ } while (0)
Definition at line 87 of file vm_insnhelper.h.
| #define SET_DFP | ( | x | ) | (REG_DFP = (USAGE_ANALYSIS_REGISTER_HELPER(4, 1, (x)))) |
Definition at line 116 of file vm_insnhelper.h.
| #define SET_GLOBAL | ( | entry, | |
| val | |||
| ) | rb_gvar_set((struct rb_global_entry*)(entry), (val)) |
Definition at line 138 of file vm_insnhelper.h.
| #define SET_LFP | ( | x | ) | (REG_LFP = (USAGE_ANALYSIS_REGISTER_HELPER(3, 1, (x)))) |
Definition at line 114 of file vm_insnhelper.h.
| #define SET_PC | ( | x | ) | (REG_PC = (USAGE_ANALYSIS_REGISTER_HELPER(0, 1, (x)))) |
Definition at line 103 of file vm_insnhelper.h.
| #define SET_SP | ( | x | ) | (REG_SP = (USAGE_ANALYSIS_REGISTER_HELPER(1, 1, (x)))) |
Definition at line 120 of file vm_insnhelper.h.
Referenced by vm_invoke_block().
Definition at line 123 of file vm_insnhelper.h.
| #define STACK_ADDR_FROM_TOP | ( | n | ) | (GET_SP()-(n)) |
Definition at line 73 of file vm_insnhelper.h.
Referenced by vm_invoke_block(), and vm_method_missing_args().
Definition at line 70 of file vm_insnhelper.h.
Referenced by vm_call_method().
| #define USAGE_ANALYSIS_REGISTER_HELPER | ( | a, | |
| b, | |||
| v | |||
| ) | (v) |
Definition at line 98 of file vm_insnhelper.h.
| anonymous enum |
VM Debug Level.
debug level: 0: no debug output 1: show instruction name 2: show stack frame when control stack frame is changed 3: show stack status 4: show register 5: 10: gc check
| BOP_PLUS | |
| BOP_MINUS | |
| BOP_MULT | |
| BOP_DIV | |
| BOP_MOD | |
| BOP_EQ | |
| BOP_EQQ | |
| BOP_LT | |
| BOP_LE | |
| BOP_LTLT | |
| BOP_AREF | |
| BOP_ASET | |
| BOP_LENGTH | |
| BOP_SIZE | |
| BOP_SUCC | |
| BOP_GT | |
| BOP_GE | |
| BOP_NOT | |
| BOP_NEQ | |
| BOP_LAST_ |
Definition at line 37 of file vm_insnhelper.h.
| static void vm_clear_all_cache | ( | void | ) | [static] |
Definition at line 40 of file vm.c.
Referenced by rb_vm_inc_const_missing_count().
VALUE ruby_vm_global_state_version = 1 [static] |
Definition at line 211 of file vm_insnhelper.h.
Referenced by vm_clear_all_cache().
Definition at line 42 of file vm.c.
Referenced by rb_vm_check_redefinition_opt_method().
1.7.6.1