Ruby
2.0.0p645(2015-04-13revision50299)
|
Go to the source code of this file.
Enumerations | |
enum | { 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_EMPTY_P, BOP_SUCC, BOP_GT, BOP_GE, BOP_NOT, BOP_NEQ, BOP_LAST_ } |
enum | vm_regan_regtype { VM_REGAN_PC = 0, VM_REGAN_SP = 1, VM_REGAN_EP = 2, VM_REGAN_CFP = 3, VM_REGAN_SELF = 4, VM_REGAN_ISEQ = 5 } |
enum | vm_regan_acttype { VM_REGAN_ACT_GET = 0, VM_REGAN_ACT_SET = 1 } |
Functions | |
static void | vm_clear_all_cache (void) |
static VALUE | make_no_method_exception (VALUE exc, const char *format, VALUE obj, int argc, const VALUE *argv) |
Variables | |
char | ruby_vm_redefined_flag [BOP_LAST_] |
VALUE | ruby_vm_const_missing_count |
static VALUE | ruby_vm_global_state_version = 1 |
#define ARRAY_REDEFINED_OP_FLAG (1 << 3) |
Definition at line 235 of file vm_insnhelper.h.
Referenced by vm_redefinition_check_flag().
#define BASIC_OP_UNREDEFINED_P | ( | op, | |
klass | |||
) | (LIKELY((ruby_vm_redefined_flag[(op)]&(klass)) == 0)) |
Definition at line 241 of file vm_insnhelper.h.
Referenced by opt_eq_func().
#define BIGNUM_REDEFINED_OP_FLAG (1 << 5) |
Definition at line 237 of file vm_insnhelper.h.
Referenced by vm_redefinition_check_flag().
#define CALL_METHOD | ( | ci | ) |
Definition at line 193 of file vm_insnhelper.h.
#define CALL_SIMPLE_METHOD | ( | recv | ) |
Definition at line 255 of file vm_insnhelper.h.
#define CI_SET_FASTPATH | ( | ci, | |
func, | |||
enabled | |||
) |
Definition at line 213 of file vm_insnhelper.h.
Referenced by vm_call_method(), vm_callee_setup_arg(), and vm_search_super_method().
#define COLLECT_USAGE_INSN | ( | insn | ) | /* none */ |
Definition at line 71 of file vm_insnhelper.h.
#define COLLECT_USAGE_OPERAND | ( | insn, | |
n, | |||
op | |||
) | /* none */ |
Definition at line 72 of file vm_insnhelper.h.
#define COLLECT_USAGE_REGISTER | ( | reg, | |
s | |||
) | /* none */ |
Definition at line 73 of file vm_insnhelper.h.
Definition at line 121 of file vm_insnhelper.h.
#define COPY_CREF | ( | c1, | |
c2 | |||
) |
Definition at line 182 of file vm_insnhelper.h.
Referenced by vm_define_method().
#define COPY_CREF_OMOD | ( | c1, | |
c2 | |||
) |
Definition at line 174 of file vm_insnhelper.h.
Referenced by rb_vm_rewrite_cref_stack(), and vm_cref_push().
#define DEC_SP | ( | x | ) | (REG_SP -= (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x)))) |
Definition at line 144 of file vm_insnhelper.h.
Referenced by vm_call_opt_send().
Definition at line 243 of file vm_insnhelper.h.
Referenced by opt_eq_func().
#define FIXNUM_REDEFINED_OP_FLAG (1 << 0) |
Definition at line 232 of file vm_insnhelper.h.
Referenced by opt_eq_func(), and vm_redefinition_check_flag().
#define FLOAT_REDEFINED_OP_FLAG (1 << 1) |
Definition at line 233 of file vm_insnhelper.h.
Referenced by opt_eq_func(), and vm_redefinition_check_flag().
Definition at line 247 of file vm_insnhelper.h.
Referenced by opt_eq_func().
#define GET_BLOCK_PTR | ( | ) | ((rb_block_t *)(GC_GUARDED_PTR_REF(GET_LEP()[0]))) |
Definition at line 220 of file vm_insnhelper.h.
#define GET_CFP | ( | ) | (COLLECT_USAGE_REGISTER_HELPER(CFP, GET, REG_CFP)) |
Definition at line 135 of file vm_insnhelper.h.
Referenced by vm_invoke_block(), vm_search_super_method(), vm_search_superclass(), and vm_throw().
Definition at line 162 of file vm_insnhelper.h.
#define GET_CURRENT_INSN | ( | ) | (*GET_PC()) |
Definition at line 127 of file vm_insnhelper.h.
#define GET_EP | ( | ) | (COLLECT_USAGE_REGISTER_HELPER(EP, GET, REG_EP)) |
Definition at line 136 of file vm_insnhelper.h.
Referenced by vm_throw().
#define GET_GLOBAL | ( | entry | ) | rb_gvar_get((struct rb_global_entry*)(entry)) |
Definition at line 159 of file vm_insnhelper.h.
#define GET_ISEQ | ( | ) | (GET_CFP()->iseq) |
Definition at line 151 of file vm_insnhelper.h.
Referenced by vm_invoke_block(), vm_search_super_method(), and vm_throw().
Definition at line 138 of file vm_insnhelper.h.
Definition at line 128 of file vm_insnhelper.h.
#define GET_PC | ( | ) | (COLLECT_USAGE_REGISTER_HELPER(PC, GET, REG_PC)) |
Definition at line 125 of file vm_insnhelper.h.
Definition at line 131 of file vm_insnhelper.h.
#define GET_PREV_EP | ( | ep | ) | ((VALUE *)((ep)[0] & ~0x03)) |
Definition at line 157 of file vm_insnhelper.h.
#define GET_SELF | ( | ) | (COLLECT_USAGE_REGISTER_HELPER(SELF, GET, GET_CFP()->self)) |
Definition at line 168 of file vm_insnhelper.h.
#define GET_SP | ( | ) | (COLLECT_USAGE_REGISTER_HELPER(SP, GET, REG_SP)) |
Definition at line 141 of file vm_insnhelper.h.
Referenced by vm_invoke_block().
Definition at line 148 of file vm_insnhelper.h.
#define GET_TOS | ( | ) | (tos) /* dummy */ |
Definition at line 86 of file vm_insnhelper.h.
#define GET_VM_STATE_VERSION | ( | ) | (ruby_vm_global_state_version) |
Definition at line 263 of file vm_insnhelper.h.
Referenced by rb_method_entry(), rb_method_entry_get_without_cache(), vm_getivar(), vm_search_method(), and vm_setivar().
#define HASH_REDEFINED_OP_FLAG (1 << 4) |
Definition at line 236 of file vm_insnhelper.h.
Referenced by vm_redefinition_check_flag().
Definition at line 249 of file vm_insnhelper.h.
Referenced by opt_eq_func().
#define INC_SP | ( | x | ) | (REG_SP += (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x)))) |
Definition at line 143 of file vm_insnhelper.h.
Referenced by vm_call_method_missing().
#define INC_VM_STATE_VERSION | ( | ) |
Definition at line 264 of file vm_insnhelper.h.
Referenced by m_core_undef_method(), rb_vm_change_state(), and vm_define_method().
Definition at line 132 of file vm_insnhelper.h.
#define OPT_CALL_FASTPATH 1 |
Definition at line 209 of file vm_insnhelper.h.
#define POP | ( | ) | (DEC_SP(1)) |
Definition at line 83 of file vm_insnhelper.h.
Definition at line 82 of file vm_insnhelper.h.
Referenced by vm_invoke_block().
Definition at line 80 of file vm_insnhelper.h.
#define REG_A reg_a |
Definition at line 101 of file vm_insnhelper.h.
#define REG_B reg_b |
Definition at line 102 of file vm_insnhelper.h.
#define REG_CFP (reg_cfp) |
Definition at line 92 of file vm_insnhelper.h.
#define REG_EP (REG_CFP->ep) |
Definition at line 95 of file vm_insnhelper.h.
#define REG_PC (REG_CFP->pc) |
Definition at line 93 of file vm_insnhelper.h.
#define REG_SP (REG_CFP->sp) |
Definition at line 94 of file vm_insnhelper.h.
#define RESTORE_REGS | ( | ) |
Definition at line 97 of file vm_insnhelper.h.
#define SET_EP | ( | x | ) | (REG_EP = (COLLECT_USAGE_REGISTER_HELPER(EP, SET, (x)))) |
Definition at line 137 of file vm_insnhelper.h.
#define SET_GLOBAL | ( | entry, | |
val | |||
) | rb_gvar_set((struct rb_global_entry*)(entry), (val)) |
Definition at line 160 of file vm_insnhelper.h.
#define SET_PC | ( | x | ) | (REG_PC = (COLLECT_USAGE_REGISTER_HELPER(PC, SET, (x)))) |
Definition at line 126 of file vm_insnhelper.h.
#define SET_SP | ( | x | ) | (REG_SP = (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x)))) |
Definition at line 142 of file vm_insnhelper.h.
Referenced by vm_invoke_block().
#define SET_SV | ( | x | ) | (*GET_SP() = (x)) |
Definition at line 145 of file vm_insnhelper.h.
Definition at line 84 of file vm_insnhelper.h.
Referenced by vm_call_method(), vm_call_method_missing(), and vm_invoke_block().
#define STRING_REDEFINED_OP_FLAG (1 << 2) |
Definition at line 234 of file vm_insnhelper.h.
Referenced by opt_eq_func(), and vm_redefinition_check_flag().
#define SYMBOL_REDEFINED_OP_FLAG (1 << 6) |
Definition at line 238 of file vm_insnhelper.h.
Referenced by vm_redefinition_check_flag().
#define TIME_REDEFINED_OP_FLAG (1 << 7) |
Definition at line 239 of file vm_insnhelper.h.
Referenced by vm_redefinition_check_flag().
Definition at line 81 of file vm_insnhelper.h.
Referenced by vm_call_opt_send(), and vm_search_super_method().
#define USE_IC_FOR_SPECIALIZED_METHOD 1 |
Definition at line 252 of file vm_insnhelper.h.
#define VMDEBUG 0 |
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
Definition at line 29 of file vm_insnhelper.h.
anonymous enum |
Enumerator | |
---|---|
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_EMPTY_P | |
BOP_SUCC | |
BOP_GT | |
BOP_GE | |
BOP_NOT | |
BOP_NEQ | |
BOP_LAST_ |
Definition at line 37 of file vm_insnhelper.h.
enum vm_regan_acttype |
Enumerator | |
---|---|
VM_REGAN_ACT_GET | |
VM_REGAN_ACT_SET |
Definition at line 112 of file vm_insnhelper.h.
enum vm_regan_regtype |
Enumerator | |
---|---|
VM_REGAN_PC | |
VM_REGAN_SP | |
VM_REGAN_EP | |
VM_REGAN_CFP | |
VM_REGAN_SELF | |
VM_REGAN_ISEQ |
Definition at line 104 of file vm_insnhelper.h.
|
static |
VALUE ruby_vm_const_missing_count |
Definition at line 94 of file vm.c.
Referenced by rb_vm_inc_const_missing_count().
|
static |
Definition at line 261 of file vm_insnhelper.h.
Referenced by vm_clear_all_cache().
char ruby_vm_redefined_flag[BOP_LAST_] |
Definition at line 95 of file vm.c.
Referenced by rb_vm_check_redefinition_opt_method().