Ruby
1.9.3p551(2014-11-13revision48407)
|
Go to the source code of this file.
Macros | |
#define | INLINE inline |
#define | COLLECT_PROFILE 0 |
#define | VM_CALLEE_SETUP_ARG(ret, th, iseq, orig_argc, orig_argv, block) |
#define | USE_IC_FOR_IVAR 1 |
#define COLLECT_PROFILE 0 |
#define INLINE inline |
Definition at line 20 of file vm_insnhelper.c.
#define USE_IC_FOR_IVAR 1 |
Definition at line 1267 of file vm_insnhelper.c.
Definition at line 135 of file vm_insnhelper.c.
Referenced by vm_setup_method(), and vm_yield_setup_args().
Definition at line 111 of file vm_insnhelper.c.
References exc, rb_iseq_struct::filename, rb_iseq_struct::insn_info_size, rb_iseq_struct::insn_info_table, iseq_insn_info_entry::line_no, rb_iseq_struct::name, rb_eArgError, rb_exc_new3(), rb_exc_raise(), rb_funcall(), rb_intern, rb_make_backtrace(), rb_sprintf(), and RSTRING_PTR.
Referenced by vm_callee_setup_arg_complex().
Definition at line 684 of file vm_insnhelper.c.
References GetProcPtr, rb_proc_t::is_lambda, and proc.
Referenced by invoke_block_from_c(), vm_invoke_block(), and vm_yield_with_cfunc().
|
inlinestatic |
Definition at line 302 of file vm_insnhelper.c.
References argc, argv, func, Qundef, rb_ary_new4(), rb_eArgError, and rb_raise().
Referenced by vm_call0(), and vm_call_cfunc().
|
inlinestatic |
Definition at line 238 of file vm_insnhelper.c.
References argc, ary, b, rb_proc_t::block, CHECK_STACK_OVERFLOW, GetProcPtr, i, rb_block_struct::iseq, len, NIL_P, rb_block_struct::proc, proc, ptr, Qnil, RARRAY_LEN, RARRAY_PTR(), rb_check_convert_type(), rb_eTypeError, rb_obj_classname(), rb_obj_is_proc(), rb_raise(), RUBY_VM_GET_BLOCK_PTR_IN_CFP, rb_control_frame_t::sp, T_ARRAY, T_DATA, VM_CALL_ARGS_BLOCKARG_BIT, and VM_CALL_ARGS_SPLAT_BIT.
Referenced by vm_invoke_block().
|
inlinestatic |
Definition at line 1690 of file vm_insnhelper.c.
References rb_method_definition_struct::body, rb_method_definition_struct::cfunc, rb_method_entry_struct::def, rb_method_cfunc_struct::func, func, rb_method_definition_struct::type, and VM_METHOD_TYPE_CFUNC.
Referenced by opt_eq_func().
|
static |
Definition at line 980 of file vm_insnhelper.c.
References ary, DEFAULT_SPECIAL_VAR_COUNT, lfp_svar_place(), NIL_P, Qnil, rb_ary_entry(), RNode::u1, RNode::u2, RNode::u3, and RNode::value.
Referenced by vm_cfp_svar_get(), and vm_getspecial().
|
inlinestatic |
Definition at line 963 of file vm_insnhelper.c.
References rb_thread_struct::local_lfp, rb_thread_struct::local_svar, NEW_IF, NIL_P, and Qnil.
Referenced by lfp_svar_get(), and lfp_svar_set().
|
static |
Definition at line 1003 of file vm_insnhelper.c.
References ary, DEFAULT_SPECIAL_VAR_COUNT, lfp_svar_place(), NIL_P, rb_ary_new(), rb_ary_store(), RNode::u1, RNode::u2, RNode::u3, val, and RNode::value.
Referenced by vm_cfp_svar_set().
NORETURN | ( | static void | argument_errorconst rb_iseq_t *iseq, int miss_argc, int correct_argc | ) |
Definition at line 1706 of file vm_insnhelper.c.
References a, b, BASIC_OP_UNREDEFINED_P, BOP_EQ, check_cfunc(), CLASS_OF, FIXNUM_2_P, HEAP_CLASS_OF, idEq, isnan, Qfalse, Qtrue, Qundef, rb_cFloat, rb_cString, rb_obj_equal(), rb_str_equal(), RFLOAT_VALUE, SPECIAL_CONST_P, and vm_method_search().
|
inlinestatic |
Definition at line 418 of file vm_insnhelper.c.
References rb_method_definition_struct::body, rb_method_entry_struct::called_id, rb_method_entry_struct::def, EXEC_EVENT_HOOK, GetProcPtr, rb_method_entry_struct::klass, rb_thread_struct::passed_me, rb_method_definition_struct::proc, proc, rb_vm_invoke_proc(), RUBY_EVENT_CALL, RUBY_EVENT_RETURN, and val.
Referenced by vm_call0(), and vm_call_method().
|
inlinestatic |
Definition at line 389 of file vm_insnhelper.c.
References rb_method_cfunc_struct::argc, rb_method_definition_struct::body, call_cfunc(), rb_method_entry_struct::called_id, rb_thread_struct::cfp, rb_method_definition_struct::cfunc, rb_method_entry_struct::def, EXEC_EVENT_HOOK, rb_method_cfunc_struct::func, rb_method_entry_struct::klass, rb_control_frame_t::me, rb_bug(), RUBY_EVENT_C_CALL, RUBY_EVENT_C_RETURN, rb_control_frame_t::sp, val, VM_FRAME_MAGIC_CFUNC, vm_pop_frame(), and vm_push_frame().
Referenced by vm_call_method().
|
inlinestatic |
Definition at line 512 of file vm_insnhelper.c.
References ALLOCA_N, argc, argv, rb_method_definition_struct::attr, rb_proc_t::block, rb_method_definition_struct::body, CLASS_OF, DEC_SP, rb_method_entry_struct::def, rb_method_entry_struct::flag, GetProcPtr, i, rb_method_attr_struct::id, ID2SYM, rb_method_entry_struct::klass, klass, MEMCPY, MEMMOVE, NOEX_MASK, NOEX_PRIVATE, NOEX_PROTECTED, NOEX_SAFE, NOEX_SUPER, NOEX_VCALL, rb_method_definition_struct::optimize_type, rb_method_definition_struct::original_id, rb_thread_struct::passed_block, proc, Qundef, rb_attr_get(), rb_bug(), rb_eArgError, rb_eSecurityError, rb_funcall2(), rb_id2name(), rb_intern, rb_ivar_set(), rb_method_entry(), rb_obj_is_kind_of(), rb_raise(), rb_raise_method_missing(), rb_to_id(), RB_TYPE_P, rb_vm_invoke_proc(), RBASIC, RCLASS_SUPER, RUBY_VM_CHECK_INTS, rb_thread_struct::safe_level, rb_control_frame_t::self, rb_block_struct::self, rb_control_frame_t::sp, stat, sym, SYM2ID, SYMBOL_P, T_ICLASS, TOPN, rb_method_definition_struct::type, val, vm_call_bmethod(), vm_call_cfunc(), VM_CALL_FCALL_BIT, VM_CALL_OPT_SEND_BIT, VM_CALL_SUPER_BIT, VM_CALL_VCALL_BIT, vm_method_missing(), vm_method_missing_args(), VM_METHOD_TYPE_ATTRSET, VM_METHOD_TYPE_BMETHOD, VM_METHOD_TYPE_CFUNC, VM_METHOD_TYPE_ISEQ, VM_METHOD_TYPE_IVAR, VM_METHOD_TYPE_MISSING, VM_METHOD_TYPE_NOTIMPLEMENTED, VM_METHOD_TYPE_OPTIMIZED, VM_METHOD_TYPE_ZSUPER, and vm_setup_method().
|
inlinestatic |
Definition at line 148 of file vm_insnhelper.c.
References ALLOCA_N, rb_iseq_struct::arg_block, rb_iseq_struct::arg_opt_table, rb_iseq_struct::arg_opts, rb_iseq_struct::arg_post_len, rb_iseq_struct::arg_post_start, rb_iseq_struct::arg_rest, rb_iseq_struct::arg_size, rb_iseq_struct::argc, argc, argument_error(), argv, rb_proc_t::block, block, GetProcPtr, i, m, rb_thread_struct::mark_stack_len, MEMCPY, opts, rb_block_struct::proc, proc, Qnil, rb_ary_new4(), rb_cProc, and rb_vm_make_proc().
Definition at line 1138 of file vm_insnhelper.c.
References rb_eTypeError, rb_inspect(), rb_raise(), str, StringValuePtr, T_CLASS, T_MODULE, and TYPE.
Referenced by vm_get_ev_const().
|
static |
Definition at line 1088 of file vm_insnhelper.c.
References rb_thread_struct::cfp, rb_control_frame_t::dfp, rb_block_struct::dfp, rb_control_frame_t::iseq, rb_block_struct::iseq, rb_control_frame_t::lfp, rb_block_struct::lfp, NEW_BLOCK, vm_get_cref0(), and vm_get_ruby_level_caller_cfp().
|
inlinestatic |
Definition at line 1629 of file vm_insnhelper.c.
References ary, i, len, ptr, Qnil, RARRAY_LEN, RARRAY_PTR(), rb_ary_new(), rb_ary_new4(), rb_ary_to_ary(), rb_control_frame_t::sp, T_ARRAY, TYPE, and v.
|
inlinestatic |
Definition at line 1105 of file vm_insnhelper.c.
References klass, Qundef, and vm_get_cref().
Referenced by rb_vm_cbase().
|
inlinestatic |
Definition at line 1121 of file vm_insnhelper.c.
References RNode::flags, klass, NODE_FL_CREF_PUSHED_BY_EVAL, Qundef, and vm_get_cref().
Definition at line 1077 of file vm_insnhelper.c.
References rb_bug(), and vm_get_cref0().
Referenced by rb_vm_cref(), vm_get_cbase(), vm_get_const_base(), and vm_get_ev_const().
Definition at line 1062 of file vm_insnhelper.c.
References rb_iseq_struct::cref_stack, GET_PREV_DFP, NULL, Qnil, and RUBY_VM_NORMAL_ISEQ_P.
Referenced by vm_cref_push(), and vm_get_cref().
Definition at line 1230 of file vm_insnhelper.c.
References FL_SINGLETON, FL_TEST, RNode::flags, klass, NIL_P, NODE_FL_CREF_PUSHED_BY_EVAL, rb_eTypeError, rb_raise(), and rb_warn().
|
inlinestatic |
Definition at line 1153 of file vm_insnhelper.c.
References rb_thread_struct::cfp, CLASS_OF, data, rb_control_frame_t::dfp, RNode::flags, klass, rb_control_frame_t::lfp, NIL_P, NODE_FL_CREF_PUSHED_BY_EVAL, Qnil, Qundef, rb_autoload_load(), rb_const_defined(), rb_const_get(), rb_public_const_defined_from(), rb_public_const_get_from(), RCLASS_CONST_TBL, rb_control_frame_t::self, st_lookup, val, vm_check_if_namespace(), and vm_get_cref().
|
static |
Referenced by vm_cref_push().
Definition at line 1271 of file vm_insnhelper.c.
References GET_VM_STATE_VERSION, iseq_inline_cache_entry::ic_class, iseq_inline_cache_entry::ic_value, iseq_inline_cache_entry::ic_vmstat, iseq_inline_cache_entry::index, index, klass, len, LIKELY, ptr, Qnil, Qundef, rb_id2name(), rb_ivar_get(), rb_warning(), RBASIC, ROBJECT_IV_INDEX_TBL, ROBJECT_IVPTR, ROBJECT_NUMIV, st_lookup, T_OBJECT, TYPE, UNLIKELY, and val.
|
inlinestatic |
Definition at line 1026 of file vm_insnhelper.c.
References lfp_svar_get(), rb_bug(), rb_reg_last_match(), rb_reg_match_last(), rb_reg_match_post(), rb_reg_match_pre(), rb_reg_nth_match(), and val.
|
static |
Definition at line 922 of file vm_insnhelper.c.
References rb_iseq_struct::arg_size, argc, block, block_proc_is_lambda(), BUILTIN_TYPE, caller_setup_args(), CHECK_STACK_OVERFLOW, rb_block_struct::dfp, GET_BLOCK_PTR, GET_CFP, GET_ISEQ, GET_SP, int, rb_block_struct::iseq, rb_iseq_struct::iseq_encoded, rb_block_struct::lfp, rb_iseq_struct::local_size, POPN, rb_block_struct::proc, Qnil, Qundef, rb_vm_localjump_error(), rb_block_struct::self, SET_SP, STACK_ADDR_FROM_TOP, rb_iseq_struct::stack_max, T_NODE, type, val, VM_FRAME_MAGIC_BLOCK, vm_push_frame(), vm_yield_setup_args(), and vm_yield_with_cfunc().
|
inlinestatic |
Definition at line 448 of file vm_insnhelper.c.
References ALLOCA_N, argv, ID2SYM, rb_funcall2(), and vm_method_missing_args().
Referenced by vm_call_method().
|
inlinestatic |
Definition at line 437 of file vm_insnhelper.c.
References rb_thread_struct::cfp, MEMCPY, rb_thread_struct::method_missing_reason, rb_thread_struct::passed_block, POPN, and STACK_ADDR_FROM_TOP.
Referenced by vm_call_method(), and vm_method_missing().
|
inlinestatic |
Definition at line 1362 of file vm_insnhelper.c.
References GET_VM_STATE_VERSION, iseq_inline_cache_entry::ic_class, iseq_inline_cache_entry::ic_value, iseq_inline_cache_entry::ic_vmstat, klass, LIKELY, iseq_inline_cache_entry::method, and rb_method_entry().
Referenced by opt_eq_func().
|
inlinestatic |
Definition at line 81 of file vm_insnhelper.c.
References rb_thread_struct::cfp, rb_control_frame_t::iseq, RUBY_VM_NORMAL_ISEQ_P, RUBY_VM_PREVIOUS_CONTROL_FRAME, SDR, and VMDEBUG.
Referenced by rb_vm_call_cfunc(), vm_call0(), vm_call_cfunc(), and vm_exec().
|
inlinestatic |
Definition at line 26 of file vm_insnhelper.c.
References rb_control_frame_t::block_iseq, rb_control_frame_t::bp, rb_thread_struct::cfp, rb_control_frame_t::dfp, rb_control_frame_t::flag, GC_GUARDED_PTR, i, rb_control_frame_t::iseq, rb_control_frame_t::lfp, rb_control_frame_t::me, rb_control_frame_t::pc, rb_control_frame_t::proc, Qnil, rb_exc_raise(), SDR, rb_control_frame_t::self, rb_control_frame_t::sp, sysstack_error, type, and VMDEBUG.
Referenced by invoke_block_from_c(), rb_vm_call_cfunc(), rb_vm_set_finish_env(), th_init(), vm_call0(), vm_call_cfunc(), vm_exec(), vm_invoke_block(), vm_set_eval_stack(), vm_set_top_stack(), vm_setup_method(), and vm_yield_with_cfunc().
Definition at line 1253 of file vm_insnhelper.c.
References rb_cObject, rb_const_defined_at(), and RCLASS_SUPER.
Definition at line 1383 of file vm_insnhelper.c.
References BUILTIN_TYPE, CLASS_OF, rb_bug(), rb_cObject, RBASIC, RCLASS_SUPER, T_CLASS, T_ICLASS, and T_MODULE.
Referenced by vm_call_super(), and vm_search_superclass().
|
static |
Definition at line 1404 of file vm_insnhelper.c.
References rb_method_entry_struct::def, rb_iseq_struct::defined_method_id, rb_control_frame_t::dfp, GET_CFP, GET_PREV_DFP, GET_THREAD, id, rb_control_frame_t::iseq, rb_method_entry_struct::klass, rb_iseq_struct::klass, klass, rb_iseq_struct::local_iseq, rb_control_frame_t::me, rb_method_definition_struct::original_id, rb_iseq_struct::parent_iseq, rb_eNoMethodError, rb_eRuntimeError, rb_raise(), RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P, RUBY_VM_PREVIOUS_CONTROL_FRAME, th, and vm_search_normal_superclass().
Definition at line 1320 of file vm_insnhelper.c.
References GET_VM_STATE_VERSION, iseq_inline_cache_entry::ic_class, iseq_inline_cache_entry::ic_value, iseq_inline_cache_entry::ic_vmstat, iseq_inline_cache_entry::index, index, klass, len, LIKELY, OBJ_UNTRUSTED, ptr, rb_check_frozen, rb_eSecurityError, rb_ivar_set(), rb_raise(), rb_safe_level, RBASIC, ROBJECT_IV_INDEX_TBL, ROBJECT_IVPTR, ROBJECT_NUMIV, st_lookup, T_OBJECT, TYPE, and val.
|
inlinestatic |
Definition at line 458 of file vm_insnhelper.c.
References rb_iseq_struct::arg_size, argc, rb_method_definition_struct::body, rb_thread_struct::cfp, CHECK_STACK_OVERFLOW, rb_method_entry_struct::def, i, rb_method_definition_struct::iseq, rb_iseq_struct::iseq_encoded, LIKELY, rb_iseq_struct::local_size, Qnil, rb_control_frame_t::sp, rb_iseq_struct::stack_max, VM_CALL_TAILCALL_BIT, VM_CALLEE_SETUP_ARG, VM_FRAME_MAGIC_METHOD, and vm_push_frame().
Referenced by vm_call0(), and vm_call_method().
|
static |
Definition at line 1462 of file vm_insnhelper.c.
References BUILTIN_TYPE, rb_iseq_struct::catch_table, rb_iseq_struct::catch_table_size, iseq_catch_table_entry::CATCH_TYPE_BREAK, iseq_catch_table_entry::cont, rb_control_frame_t::dfp, iseq_catch_table_entry::end, err, FIX2INT, FIXNUM_P, flag, GC_GUARDED_PTR_REF, GET_CFP, GET_DFP, GET_ISEQ, GET_LFP, GET_THROWOBJ_STATE, i, int, rb_control_frame_t::iseq, rb_iseq_struct::iseq_encoded, level, rb_control_frame_t::lfp, NEW_THROW_OBJECT, rb_iseq_struct::parent_iseq, rb_control_frame_t::pc, rb_bug(), rb_vm_localjump_error(), RUBY_VM_PREVIOUS_CONTROL_FRAME, rb_thread_struct::stack_size, iseq_catch_table_entry::start, rb_thread_struct::state, SYMBOL_P, T_NODE, TAG_BREAK, TAG_RAISE, TAG_RETRY, TAG_RETURN, TAG_THROW, iseq_catch_table_entry::type, rb_iseq_struct::type, VM_FRAME_MAGIC_LAMBDA, and VM_FRAME_TYPE.
|
inlinestatic |
Definition at line 895 of file vm_insnhelper.c.
References rb_iseq_struct::arg_block, rb_iseq_struct::arg_opts, rb_iseq_struct::arg_post_len, rb_iseq_struct::arg_rest, rb_iseq_struct::arg_simple, rb_iseq_struct::argc, VM_CALLEE_SETUP_ARG, and vm_yield_setup_block_args().
Referenced by invoke_block_from_c(), and vm_invoke_block().
|
inlinestatic |
Definition at line 804 of file vm_insnhelper.c.
References rb_iseq_struct::arg_block, rb_iseq_struct::arg_opts, rb_iseq_struct::arg_post_len, rb_iseq_struct::arg_rest, rb_iseq_struct::arg_simple, rb_iseq_struct::arg_size, rb_iseq_struct::argc, argc, ary, rb_thread_struct::cfp, CHECK_STACK_OVERFLOW, i, m, rb_thread_struct::mark_stack_len, MEMCPY, NIL_P, rb_block_struct::proc, Qnil, r, RARRAY_LENINT, RARRAY_PTR(), rb_ary_new(), rb_ary_new4(), rb_check_array_type(), rb_cProc, rb_vm_make_proc(), and vm_yield_setup_block_args_complex().
Referenced by vm_yield_setup_args().
|
inlinestatic |
Definition at line 747 of file vm_insnhelper.c.
References rb_iseq_struct::arg_opt_table, rb_iseq_struct::arg_opts, rb_iseq_struct::arg_post_len, rb_iseq_struct::arg_post_start, rb_iseq_struct::arg_rest, rb_iseq_struct::argc, ary, i, len, m, MEMMOVE, opts, Qnil, r, rb_ary_new4(), and start.
Referenced by vm_yield_setup_block_args().
|
inlinestatic |
Definition at line 698 of file vm_insnhelper.c.
References arg, block_proc_is_lambda(), rb_thread_struct::cfp, rb_block_struct::dfp, GC_GUARDED_PTR, rb_block_struct::iseq, rb_control_frame_t::lfp, rb_block_struct::lfp, rb_block_struct::proc, Qnil, rb_ary_new4(), rb_cProc, rb_vm_make_proc(), rb_control_frame_t::sp, val, VM_FRAME_MAGIC_IFUNC, and vm_push_frame().
Referenced by invoke_block_from_c(), and vm_invoke_block().