Ruby
2.4.2p198(2017-09-14revision59899)
|
Go to the source code of this file.
Enumerations | |
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 VALUE | make_no_method_exception (VALUE exc, VALUE format, VALUE obj, int argc, const VALUE *argv, int priv) |
static struct vm_throw_data * | THROW_DATA_NEW (VALUE val, const rb_control_frame_t *cf, VALUE st) |
static VALUE | THROW_DATA_VAL (const struct vm_throw_data *obj) |
static const rb_control_frame_t * | THROW_DATA_CATCH_FRAME (const struct vm_throw_data *obj) |
static int | THROW_DATA_STATE (const struct vm_throw_data *obj) |
static int | THROW_DATA_CONSUMED_P (const struct vm_throw_data *obj) |
static void | THROW_DATA_CATCH_FRAME_SET (struct vm_throw_data *obj, const rb_control_frame_t *cfp) |
static void | THROW_DATA_STATE_SET (struct vm_throw_data *obj, int st) |
static void | THROW_DATA_CONSUMED_SET (struct vm_throw_data *obj) |
Variables | |
VALUE | ruby_vm_const_missing_count |
Definition at line 81 of file vm_insnhelper.h.
#define CALL_METHOD | ( | calling, | |
ci, | |||
cc | |||
) |
Definition at line 124 of file vm_insnhelper.h.
#define CALL_SIMPLE_METHOD | ( | recv_ | ) |
Definition at line 174 of file vm_insnhelper.h.
#define CI_SET_FASTPATH | ( | cc, | |
func, | |||
enabled | |||
) |
Definition at line 144 of file vm_insnhelper.h.
Referenced by vm_call_cfunc_with_frame(), vm_call_method(), vm_call_method_each_type(), vm_call_method_nome(), vm_callee_setup_arg(), and vm_search_super_method().
#define COLLECT_USAGE_INSN | ( | insn | ) | /* none */ |
Definition at line 23 of file vm_insnhelper.h.
#define COLLECT_USAGE_OPERAND | ( | insn, | |
n, | |||
op | |||
) | /* none */ |
Definition at line 24 of file vm_insnhelper.h.
#define COLLECT_USAGE_REGISTER | ( | reg, | |
s | |||
) | /* none */ |
Definition at line 25 of file vm_insnhelper.h.
#define COLLECT_USAGE_REGISTER_HELPER | ( | a, | |
b, | |||
v | |||
) | (v) |
Definition at line 73 of file vm_insnhelper.h.
#define DEC_SP | ( | x | ) | (VM_REG_SP -= (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x)))) |
Definition at line 94 of file vm_insnhelper.h.
Referenced by vm_call_opt_send().
#define FIXNUM_2_P | ( | a, | |
b | |||
) | ((a) & (b) & 1) |
Definition at line 163 of file vm_insnhelper.h.
Referenced by opt_eq_func().
#define FLONUM_2_P | ( | a, | |
b | |||
) | 0 |
Definition at line 167 of file vm_insnhelper.h.
Referenced by opt_eq_func().
#define GET_BLOCK_HANDLER | ( | ) | (GET_LEP()[VM_ENV_DATA_INDEX_SPECVAL]) |
Definition at line 151 of file vm_insnhelper.h.
Referenced by vm_caller_setup_arg_block(), and vm_defined().
#define GET_CFP | ( | ) | (COLLECT_USAGE_REGISTER_HELPER(CFP, GET, VM_REG_CFP)) |
Definition at line 85 of file vm_insnhelper.h.
Referenced by vm_defined().
Definition at line 112 of file vm_insnhelper.h.
#define GET_CURRENT_INSN | ( | ) | (*GET_PC()) |
Definition at line 79 of file vm_insnhelper.h.
#define GET_EP | ( | ) | (COLLECT_USAGE_REGISTER_HELPER(EP, GET, VM_REG_EP)) |
Definition at line 86 of file vm_insnhelper.h.
Referenced by vm_defined(), and vm_throw_start().
#define GET_GLOBAL | ( | entry | ) | rb_gvar_get((struct rb_global_entry*)(entry)) |
Definition at line 109 of file vm_insnhelper.h.
#define GET_GLOBAL_CONSTANT_STATE | ( | ) | (ruby_vm_global_constant_state) |
Definition at line 185 of file vm_insnhelper.h.
#define GET_GLOBAL_METHOD_STATE | ( | ) | (ruby_vm_global_method_state) |
Definition at line 183 of file vm_insnhelper.h.
Referenced by method_entry_get(), method_entry_get_without_cache(), and vm_search_method().
#define GET_ISEQ | ( | ) | (GET_CFP()->iseq) |
Definition at line 101 of file vm_insnhelper.h.
Referenced by vm_invoke_block(), and vm_throw_start().
Definition at line 88 of file vm_insnhelper.h.
Referenced by vm_defined().
#define GET_OPERAND | ( | n | ) | (GET_PC()[(n)]) |
Definition at line 80 of file vm_insnhelper.h.
#define GET_PC | ( | ) | (COLLECT_USAGE_REGISTER_HELPER(PC, GET, VM_REG_PC)) |
Definition at line 77 of file vm_insnhelper.h.
Referenced by rb_vm_get_insns_address_table().
#define GET_PREV_EP | ( | ep | ) | ((VALUE *)((ep)[VM_ENV_DATA_INDEX_SPECVAL] & ~0x03)) |
Definition at line 107 of file vm_insnhelper.h.
#define GET_SELF | ( | ) | (COLLECT_USAGE_REGISTER_HELPER(SELF, GET, GET_CFP()->self)) |
Definition at line 118 of file vm_insnhelper.h.
Referenced by rb_vm_opt_struct_aref(), rb_vm_opt_struct_aset(), and vm_defined().
#define GET_SP | ( | ) | (COLLECT_USAGE_REGISTER_HELPER(SP, GET, VM_REG_SP)) |
Definition at line 91 of file vm_insnhelper.h.
Referenced by vm_invoke_iseq_block().
#define GET_SP_COUNT | ( | ) | (VM_REG_SP - th->stack) |
Definition at line 98 of file vm_insnhelper.h.
#define GET_TOS | ( | ) | (tos) /* dummy */ |
Definition at line 38 of file vm_insnhelper.h.
#define INC_GLOBAL_CONSTANT_STATE | ( | ) | (++ruby_vm_global_constant_state) |
Definition at line 186 of file vm_insnhelper.h.
Referenced by rb_clear_constant_cache().
#define INC_GLOBAL_METHOD_STATE | ( | ) | (++ruby_vm_global_method_state) |
Definition at line 184 of file vm_insnhelper.h.
Referenced by rb_clear_method_cache_by_class().
#define INC_SP | ( | x | ) | (VM_REG_SP += (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x)))) |
Definition at line 93 of file vm_insnhelper.h.
Referenced by vm_call_method_missing().
#define JUMP | ( | dst | ) | (VM_REG_PC += (dst)) |
Definition at line 82 of file vm_insnhelper.h.
#define NEXT_CLASS_SERIAL | ( | ) | (++ruby_vm_class_serial) |
Definition at line 182 of file vm_insnhelper.h.
Referenced by rb_next_class_serial().
#define OPT_CALL_FASTPATH 1 |
Definition at line 140 of file vm_insnhelper.h.
#define POP | ( | ) | (DEC_SP(1)) |
Definition at line 35 of file vm_insnhelper.h.
#define POPN | ( | n | ) | (DEC_SP(n)) |
Definition at line 34 of file vm_insnhelper.h.
Referenced by vm_invoke_ifunc_block(), and vm_invoke_symbol_block().
Definition at line 32 of file vm_insnhelper.h.
#define REG_A reg_a |
Definition at line 53 of file vm_insnhelper.h.
#define REG_B reg_b |
Definition at line 54 of file vm_insnhelper.h.
#define RESTORE_REGS | ( | ) |
Definition at line 49 of file vm_insnhelper.h.
#define SET_EP | ( | x | ) | (VM_REG_EP = (COLLECT_USAGE_REGISTER_HELPER(EP, SET, (x)))) |
Definition at line 87 of file vm_insnhelper.h.
#define SET_GLOBAL | ( | entry, | |
val | |||
) | rb_gvar_set((struct rb_global_entry*)(entry), (val)) |
Definition at line 110 of file vm_insnhelper.h.
#define SET_PC | ( | x | ) | (VM_REG_PC = (COLLECT_USAGE_REGISTER_HELPER(PC, SET, (x)))) |
Definition at line 78 of file vm_insnhelper.h.
#define SET_SP | ( | x | ) | (VM_REG_SP = (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x)))) |
Definition at line 92 of file vm_insnhelper.h.
Referenced by vm_invoke_iseq_block().
#define SET_SV | ( | x | ) | (*GET_SP() = (x)) |
Definition at line 95 of file vm_insnhelper.h.
#define STACK_ADDR_FROM_TOP | ( | n | ) | (GET_SP()-(n)) |
Definition at line 36 of file vm_insnhelper.h.
Referenced by vm_call_cfunc_with_frame(), vm_call_method_missing(), vm_call_method_nome(), vm_invoke_ifunc_block(), and vm_invoke_symbol_block().
#define TOPN | ( | n | ) | (*(GET_SP()-(n)-1)) |
Definition at line 33 of file vm_insnhelper.h.
Referenced by rb_vm_opt_struct_aref(), rb_vm_opt_struct_aset(), vm_call_opt_send(), and vm_search_super_method().
#define USE_IC_FOR_SPECIALIZED_METHOD 1 |
Definition at line 171 of file vm_insnhelper.h.
#define VM_REG_CFP (reg_cfp) |
Definition at line 44 of file vm_insnhelper.h.
#define VM_REG_EP (VM_REG_CFP->ep) |
Definition at line 47 of file vm_insnhelper.h.
#define VM_REG_PC (VM_REG_CFP->pc) |
Definition at line 45 of file vm_insnhelper.h.
#define VM_REG_SP (VM_REG_CFP->sp) |
Definition at line 46 of file vm_insnhelper.h.
enum vm_regan_acttype |
Enumerator | |
---|---|
VM_REGAN_ACT_GET | |
VM_REGAN_ACT_SET |
Definition at line 64 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 56 of file vm_insnhelper.h.
|
static |
|
inlinestatic |
Definition at line 204 of file vm_insnhelper.h.
References vm_throw_data::catch_frame.
Referenced by rb_iterate0(), and vm_exec().
|
inlinestatic |
Definition at line 223 of file vm_insnhelper.h.
References vm_throw_data::catch_frame.
Referenced by vm_exec().
|
inlinestatic |
Definition at line 216 of file vm_insnhelper.h.
References vm_throw_data::flags, THROW_DATA_CONSUMED, THROW_DATA_P, and VM_ASSERT.
Referenced by frame_return_value().
|
inlinestatic |
Definition at line 235 of file vm_insnhelper.h.
References vm_throw_data::flags, TAG_BREAK, THROW_DATA_CONSUMED, THROW_DATA_P, and THROW_DATA_STATE().
Referenced by hook_before_rewind().
|
static |
Definition at line 192 of file vm_insnhelper.h.
References imemo_throw_data, and rb_imemo_new().
Referenced by rb_throw_obj(), vm_iter_break(), and vm_throw_start().
|
inlinestatic |
Definition at line 210 of file vm_insnhelper.h.
References vm_throw_data::throw_state.
Referenced by frame_return_value(), THROW_DATA_CONSUMED_SET(), and vm_throw_continue().
|
inlinestatic |
Definition at line 229 of file vm_insnhelper.h.
References vm_throw_data::throw_state.
Referenced by vm_exec().
|
inlinestatic |
Definition at line 198 of file vm_insnhelper.h.
References vm_throw_data::throw_obj.
Referenced by frame_return_value(), rb_iterate0(), vm_catch_protect(), and vm_exec().