|
Ruby
1.9.3p448(2013-06-27revision41675)
|
Go to the source code of this file.
| #define COLLECT_PROFILE 0 |
| #define VM_CALLEE_SETUP_ARG | ( | ret, | |
| th, | |||
| iseq, | |||
| orig_argc, | |||
| orig_argv, | |||
| block | |||
| ) |
if (LIKELY((iseq)->arg_simple & 0x01)) { \ /* simple check */ \ if ((orig_argc) != (iseq)->argc) { \ argument_error((iseq), (orig_argc), (iseq)->argc); \ } \ (ret) = 0; \ } \ else { \ (ret) = vm_callee_setup_arg_complex((th), (iseq), (orig_argc), (orig_argv), (block)); \ }
Definition at line 135 of file vm_insnhelper.c.
Referenced by vm_setup_method(), and vm_yield_setup_args().
| static void argument_error | ( | const rb_iseq_t * | iseq, |
| int | miss_argc, | ||
| int | correct_argc | ||
| ) | [static] |
Definition at line 111 of file vm_insnhelper.c.
References 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().
| static int block_proc_is_lambda | ( | const VALUE | procval | ) | [inline, static] |
Definition at line 684 of file vm_insnhelper.c.
References GetProcPtr, and rb_proc_t::is_lambda.
Referenced by invoke_block_from_c(), vm_invoke_block(), and vm_yield_with_cfunc().
| static VALUE call_cfunc | ( | VALUE(*)() | func, |
| VALUE | recv, | ||
| int | len, | ||
| int | argc, | ||
| const VALUE * | argv | ||
| ) | [inline, static] |
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().
| static int caller_setup_args | ( | const rb_thread_t * | th, |
| rb_control_frame_t * | cfp, | ||
| VALUE | flag, | ||
| int | argc, | ||
| rb_iseq_t * | blockiseq, | ||
| rb_block_t ** | block | ||
| ) | [inline, static] |
Definition at line 238 of file vm_insnhelper.c.
References argc, rb_proc_t::block, CHECK_STACK_OVERFLOW, GetProcPtr, rb_block_struct::iseq, len, NIL_P, rb_block_struct::proc, 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().
| static int check_cfunc | ( | const rb_method_entry_t * | me, |
| VALUE(*)() | func | ||
| ) | [inline, static] |
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 VALUE lfp_svar_get | ( | rb_thread_t * | th, |
| VALUE * | lfp, | ||
| rb_num_t | key | ||
| ) | [static] |
Definition at line 980 of file vm_insnhelper.c.
References 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().
| static NODE* lfp_svar_place | ( | rb_thread_t * | th, |
| VALUE * | lfp | ||
| ) | [inline, static] |
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 void lfp_svar_set | ( | rb_thread_t * | th, |
| VALUE * | lfp, | ||
| rb_num_t | key, | ||
| VALUE | val | ||
| ) | [static] |
Definition at line 1003 of file vm_insnhelper.c.
References DEFAULT_SPECIAL_VAR_COUNT, lfp_svar_place(), NIL_P, rb_ary_new(), rb_ary_store(), RNode::u1, RNode::u2, RNode::u3, and RNode::value.
Referenced by vm_cfp_svar_set().
| NORETURN | ( | static void | argument_errorconst rb_iseq_t *iseq, int miss_argc, int correct_argc | ) |
| static VALUE opt_eq_func | ( | VALUE | recv, |
| VALUE | obj, | ||
| IC | ic | ||
| ) | [inline, static] |
Definition at line 1706 of file vm_insnhelper.c.
References 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().
| static VALUE vm_call_bmethod | ( | rb_thread_t * | th, |
| VALUE | recv, | ||
| int | argc, | ||
| const VALUE * | argv, | ||
| const rb_block_t * | blockptr, | ||
| const rb_method_entry_t * | me | ||
| ) | [inline, static] |
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, rb_vm_invoke_proc(), RUBY_EVENT_CALL, and RUBY_EVENT_RETURN.
Referenced by vm_call0(), and vm_call_method().
| static VALUE vm_call_cfunc | ( | rb_thread_t * | th, |
| rb_control_frame_t * | reg_cfp, | ||
| int | num, | ||
| volatile VALUE | recv, | ||
| const rb_block_t * | blockptr, | ||
| const rb_method_entry_t * | me | ||
| ) | [inline, static] |
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, VM_FRAME_MAGIC_CFUNC, vm_pop_frame(), and vm_push_frame().
Referenced by vm_call_method().
| static VALUE vm_call_method | ( | rb_thread_t * | th, |
| rb_control_frame_t * | cfp, | ||
| int | num, | ||
| const rb_block_t * | blockptr, | ||
| VALUE | flag, | ||
| ID | id, | ||
| const rb_method_entry_t * | me, | ||
| VALUE | recv | ||
| ) | [inline, static] |
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, rb_method_attr_struct::id, ID2SYM, rb_method_entry_struct::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, 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, 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().
| static int vm_callee_setup_arg_complex | ( | rb_thread_t * | th, |
| const rb_iseq_t * | iseq, | ||
| int | orig_argc, | ||
| VALUE * | orig_argv, | ||
| const rb_block_t ** | block | ||
| ) | [inline, static] |
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, argc, rb_iseq_struct::argc, argument_error(), argv, rb_proc_t::block, GetProcPtr, rb_thread_struct::mark_stack_len, MEMCPY, rb_block_struct::proc, Qnil, rb_ary_new4(), rb_cProc, and rb_vm_make_proc().
| static void vm_check_if_namespace | ( | VALUE | klass | ) | [inline, static] |
Definition at line 1138 of file vm_insnhelper.c.
References rb_eTypeError, rb_inspect(), rb_raise(), StringValuePtr, T_CLASS, T_MODULE, and TYPE.
Referenced by vm_get_ev_const().
| static NODE* vm_cref_push | ( | rb_thread_t * | th, |
| VALUE | klass, | ||
| int | noex, | ||
| rb_block_t * | blockptr | ||
| ) | [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().
| static void vm_expandarray | ( | rb_control_frame_t * | cfp, |
| VALUE | ary, | ||
| rb_num_t | num, | ||
| int | flag | ||
| ) | [inline, static] |
Definition at line 1629 of file vm_insnhelper.c.
References len, Qnil, RARRAY_LEN, RARRAY_PTR, rb_ary_new(), rb_ary_new4(), rb_ary_to_ary(), rb_control_frame_t::sp, T_ARRAY, and TYPE.
| static VALUE vm_get_cbase | ( | const rb_iseq_t * | iseq, |
| const VALUE * | lfp, | ||
| const VALUE * | dfp | ||
| ) | [inline, static] |
Definition at line 1105 of file vm_insnhelper.c.
References Qundef, and vm_get_cref().
Referenced by rb_vm_cbase().
| static VALUE vm_get_const_base | ( | const rb_iseq_t * | iseq, |
| const VALUE * | lfp, | ||
| const VALUE * | dfp | ||
| ) | [inline, static] |
Definition at line 1121 of file vm_insnhelper.c.
References RNode::flags, 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().
| static VALUE vm_get_cvar_base | ( | NODE * | cref | ) | [inline, static] |
Definition at line 1230 of file vm_insnhelper.c.
References FL_SINGLETON, FL_TEST, RNode::flags, NIL_P, NODE_FL_CREF_PUSHED_BY_EVAL, rb_eTypeError, rb_raise(), and rb_warn().
| static VALUE vm_get_ev_const | ( | rb_thread_t * | th, |
| const rb_iseq_t * | iseq, | ||
| VALUE | orig_klass, | ||
| ID | id, | ||
| int | is_defined | ||
| ) | [inline, static] |
Definition at line 1153 of file vm_insnhelper.c.
References rb_thread_struct::cfp, CLASS_OF, rb_control_frame_t::dfp, RNode::flags, 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, RNode::value, vm_check_if_namespace(), and vm_get_cref().
| static rb_control_frame_t* vm_get_ruby_level_caller_cfp | ( | rb_thread_t * | th, |
| rb_control_frame_t * | cfp | ||
| ) | [static] |
Referenced by vm_cref_push().
| static VALUE vm_getivar | ( | VALUE | obj, |
| ID | id, | ||
| IC | ic | ||
| ) | [static] |
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, len, LIKELY, Qnil, Qundef, rb_id2name(), rb_ivar_get(), rb_warning(), RBASIC, ROBJECT_IV_INDEX_TBL, ROBJECT_IVPTR, ROBJECT_NUMIV, st_lookup, T_OBJECT, TYPE, and UNLIKELY.
| static VALUE vm_getspecial | ( | rb_thread_t * | th, |
| VALUE * | lfp, | ||
| rb_num_t | key, | ||
| rb_num_t | type | ||
| ) | [inline, static] |
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(), and rb_reg_nth_match().
| static VALUE vm_invoke_block | ( | rb_thread_t * | th, |
| rb_control_frame_t * | reg_cfp, | ||
| rb_num_t | num, | ||
| rb_num_t | flag | ||
| ) | [static] |
Definition at line 922 of file vm_insnhelper.c.
References rb_iseq_struct::arg_size, argc, 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, 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, VM_FRAME_MAGIC_BLOCK, vm_push_frame(), vm_yield_setup_args(), and vm_yield_with_cfunc().
| static VALUE vm_method_missing | ( | rb_thread_t * | th, |
| ID | id, | ||
| VALUE | recv, | ||
| int | num, | ||
| const rb_block_t * | blockptr, | ||
| int | opt | ||
| ) | [inline, static] |
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().
| static void vm_method_missing_args | ( | rb_thread_t * | th, |
| VALUE * | argv, | ||
| int | num, | ||
| const rb_block_t * | blockptr, | ||
| int | opt | ||
| ) | [inline, static] |
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().
| static const rb_method_entry_t* vm_method_search | ( | VALUE | id, |
| VALUE | klass, | ||
| IC | ic | ||
| ) | [inline, static] |
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, LIKELY, iseq_inline_cache_entry::method, and rb_method_entry().
Referenced by opt_eq_func().
| static void vm_pop_frame | ( | rb_thread_t * | th | ) | [inline, static] |
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, and SDR.
Referenced by rb_vm_call_cfunc(), vm_call0(), vm_call_cfunc(), and vm_exec().
| static rb_control_frame_t* vm_push_frame | ( | rb_thread_t * | th, |
| const rb_iseq_t * | iseq, | ||
| VALUE | type, | ||
| VALUE | self, | ||
| VALUE | specval, | ||
| const VALUE * | pc, | ||
| VALUE * | sp, | ||
| VALUE * | lfp, | ||
| int | local_size | ||
| ) | [inline, static] |
Definition at line 26 of file vm_insnhelper.c.
References rb_thread_struct::cfp, GC_GUARDED_PTR, Qnil, rb_exc_raise(), SDR, sysstack_error, and type.
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().
| static VALUE vm_search_const_defined_class | ( | const VALUE | cbase, |
| ID | id | ||
| ) | [static] |
Definition at line 1253 of file vm_insnhelper.c.
References rb_cObject, rb_const_defined_at(), and RCLASS_SUPER.
| static VALUE vm_search_normal_superclass | ( | VALUE | klass, |
| VALUE | recv | ||
| ) | [inline, static] |
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 void vm_search_superclass | ( | rb_control_frame_t * | reg_cfp, |
| rb_iseq_t * | iseq, | ||
| VALUE | recv, | ||
| VALUE | sigval, | ||
| ID * | idp, | ||
| VALUE * | klassp | ||
| ) | [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, 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, and vm_search_normal_superclass().
| static void vm_setivar | ( | VALUE | obj, |
| ID | id, | ||
| VALUE | val, | ||
| IC | ic | ||
| ) | [static] |
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, len, LIKELY, OBJ_UNTRUSTED, 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, and TYPE.
| static void vm_setup_method | ( | rb_thread_t * | th, |
| rb_control_frame_t * | cfp, | ||
| VALUE | recv, | ||
| int | argc, | ||
| const rb_block_t * | blockptr, | ||
| VALUE | flag, | ||
| const rb_method_entry_t * | me | ||
| ) | [inline, static] |
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, 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 VALUE vm_throw | ( | rb_thread_t * | th, |
| rb_control_frame_t * | reg_cfp, | ||
| rb_num_t | throw_state, | ||
| VALUE | throwobj | ||
| ) | [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, GC_GUARDED_PTR_REF, GET_CFP, GET_DFP, GET_ISEQ, GET_LFP, GET_THROWOBJ_STATE, rb_control_frame_t::iseq, rb_iseq_struct::iseq_encoded, 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.
| static int vm_yield_setup_args | ( | rb_thread_t *const | th, |
| const rb_iseq_t * | iseq, | ||
| int | argc, | ||
| VALUE * | argv, | ||
| const rb_block_t * | blockptr, | ||
| int | lambda | ||
| ) | [inline, static] |
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().
| static int vm_yield_setup_block_args | ( | rb_thread_t * | th, |
| const rb_iseq_t * | iseq, | ||
| int | orig_argc, | ||
| VALUE * | argv, | ||
| const rb_block_t * | blockptr | ||
| ) | [inline, static] |
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, argc, rb_iseq_struct::argc, rb_thread_struct::cfp, CHECK_STACK_OVERFLOW, rb_thread_struct::mark_stack_len, MEMCPY, NIL_P, rb_block_struct::proc, Qnil, 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().
| static int vm_yield_setup_block_args_complex | ( | rb_thread_t * | th, |
| const rb_iseq_t * | iseq, | ||
| int | argc, | ||
| VALUE * | argv | ||
| ) | [inline, static] |
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, len, MEMMOVE, Qnil, and rb_ary_new4().
Referenced by vm_yield_setup_block_args().
| static VALUE vm_yield_with_cfunc | ( | rb_thread_t * | th, |
| const rb_block_t * | block, | ||
| VALUE | self, | ||
| int | argc, | ||
| const VALUE * | argv, | ||
| const rb_block_t * | blockargptr | ||
| ) | [inline, static] |
Definition at line 698 of file vm_insnhelper.c.
References 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, VM_FRAME_MAGIC_IFUNC, and vm_push_frame().
Referenced by invoke_block_from_c(), and vm_invoke_block().
1.7.6.1