Ruby
2.4.2p198(2017-09-14revision59899)
|
Go to the source code of this file.
Data Structures | |
struct | args_info |
struct | fill_values_arg |
Macros | |
#define | IS_ARGS_SPLAT(ci) ((ci)->flag & VM_CALL_ARGS_SPLAT) |
#define | IS_ARGS_KEYWORD(ci) ((ci)->flag & VM_CALL_KWARG) |
#define | CALLER_SETUP_ARG(cfp, calling, ci) |
Enumerations | |
enum | arg_setup_type { arg_setup_method, arg_setup_block, arg_setup_lambda } |
#define CALLER_SETUP_ARG | ( | cfp, | |
calling, | |||
ci | |||
) |
Definition at line 865 of file vm_args.c.
Referenced by vm_call_bmethod(), vm_call_cfunc(), vm_call_cfunc_with_frame(), vm_call_method_each_type(), vm_call_method_missing(), vm_call_opt_call(), vm_call_opt_send(), vm_callee_setup_arg(), vm_callee_setup_block_arg(), vm_invoke_ifunc_block(), and vm_invoke_symbol_block().
#define IS_ARGS_KEYWORD | ( | ci | ) | ((ci)->flag & VM_CALL_KWARG) |
Definition at line 863 of file vm_args.c.
Referenced by vm_callee_setup_arg().
#define IS_ARGS_SPLAT | ( | ci | ) | ((ci)->flag & VM_CALL_ARGS_SPLAT) |
Definition at line 862 of file vm_args.c.
Referenced by vm_callee_setup_arg().
enum arg_setup_type |
|
inlinestatic |
Definition at line 37 of file vm_args.c.
References args_info::argc, Qfalse, RARRAY_LENINT, args_info::rest, and args_info::rest_index.
Referenced by setup_parameters_complex().
|
inlinestatic |
Definition at line 88 of file vm_args.c.
References args_info::argc, args_info::argv, FALSE, NIL_P, Qnil, RARRAY_AREF, RARRAY_LEN, rb_check_array_type(), args_info::rest, args_info::rest_index, and TRUE.
Referenced by setup_parameters_complex().
|
inlinestatic |
Definition at line 113 of file vm_args.c.
References args_info::argc, args_info::argv, Qfalse, RARRAY_ASET, rb_ary_dup(), rb_ary_new_from_values(), rb_ary_unshift(), args_info::rest, and args_info::rest_index.
Referenced by args_setup_post_parameters(), and args_setup_rest_parameter().
Definition at line 48 of file vm_args.c.
References args_info::argc, args_info::argv, Qnil, RARRAY_LENINT, rb_ary_dup(), rb_ary_push(), args_info::rest, args_info::rest_index, and VM_ASSERT.
Referenced by setup_parameters_complex().
|
static |
Definition at line 238 of file vm_args.c.
References args_info::argc, args_info::argv, rb_call_info_kw_arg::keyword_len, rb_call_info_kw_arg::keywords, args_info::kw_arg, args_info::kw_argv, rb_hash_aset(), and rb_hash_new().
Referenced by setup_parameters_complex().
|
static |
Definition at line 193 of file vm_args.c.
References args_info::argc, args_info::argv, FALSE, keyword_hash_p(), len, Qfalse, RARRAY_AREF, RARRAY_ASET, RARRAY_LEN, rb_ary_dup(), rb_ary_pop(), args_info::rest, TRUE, and VM_ASSERT.
Referenced by setup_parameters_complex().
|
inlinestatic |
Definition at line 67 of file vm_args.c.
References args_info::argc, len, Qfalse, RARRAY_LEN, rb_ary_dup(), rb_ary_resize(), args_info::rest, and VM_ASSERT.
Referenced by setup_parameters_complex().
Definition at line 155 of file vm_args.c.
References RARRAY_CONST_PTR, args_info::rest, and args_info::rest_index.
Referenced by args_setup_lead_parameters().
Definition at line 161 of file vm_args.c.
References RARRAY_LEN, rb_ary_new(), rb_ary_subseq(), args_info::rest, and args_info::rest_index.
Referenced by args_setup_rest_parameter().
|
inlinestatic |
Definition at line 478 of file vm_args.c.
References rb_calling_info::block_handler, block_handler_type_ifunc, block_handler_type_iseq, block_handler_type_proc, block_handler_type_symbol, Qnil, rb_cProc, rb_sym_to_proc(), rb_vm_make_proc(), VM_BH_TO_CAPT_BLOCK(), VM_BH_TO_PROC(), VM_BH_TO_SYMBOL(), VM_BLOCK_HANDLER_NONE, and vm_block_handler_type().
Referenced by setup_parameters_complex().
|
static |
Definition at line 397 of file vm_args.c.
References args_setup_kw_parameters_lookup(), argument_kw_error(), rb_iseq_struct::body, rb_iseq_constant_body::flags, GET_THREAD, ID2SYM, INT2FIX, key, rb_iseq_constant_body::keyword, LIKELY, make_rest_kw_hash(), make_unknown_kw_hash(), NIL_P, rb_iseq_constant_body::param, Qnil, Qtrue, Qundef, rb_ary_push(), rb_ary_tmp_new(), rb_hash_aset(), and rb_hash_new().
Referenced by setup_parameters_complex().
Definition at line 472 of file vm_args.c.
References NIL_P, rb_hash_dup(), and rb_hash_new().
Referenced by setup_parameters_complex().
|
inlinestatic |
Definition at line 282 of file vm_args.c.
References args_info::argc, args_rest_argv(), args_info::argv, and args_info::rest_index.
Referenced by setup_parameters_complex().
|
inlinestatic |
Definition at line 312 of file vm_args.c.
References args_info::argc, args_info::argv, len, Qnil, RARRAY_CONST_PTR, RARRAY_LENINT, args_info::rest, and args_info::rest_index.
Referenced by setup_parameters_complex().
|
inlinestatic |
Definition at line 302 of file vm_args.c.
References args_copy(), len, MEMCPY, RARRAY_CONST_PTR, RARRAY_LEN, rb_ary_resize(), and args_info::rest.
Referenced by setup_parameters_complex().
Definition at line 345 of file vm_args.c.
References args_copy(), and args_rest_array().
Referenced by setup_parameters_complex().
|
static |
Definition at line 259 of file vm_args.c.
References args_info::argc, args_info::argv, rb_call_info_kw_arg::keyword_len, rb_call_info_kw_arg::keywords, args_info::kw_arg, args_info::kw_argv, NULL, rb_ary_dup(), rb_ary_push(), rb_hash_aset(), rb_hash_new(), and args_info::rest.
Referenced by setup_parameters_complex().
|
static |
Definition at line 722 of file vm_args.c.
References raise_argument_error(), and rb_arity_error_new().
Referenced by setup_parameters_complex(), vm_callee_setup_arg(), and vm_callee_setup_block_arg().
|
static |
Definition at line 728 of file vm_args.c.
References raise_argument_error(), and rb_keyword_error_new().
Referenced by args_setup_kw_parameters().
Definition at line 508 of file vm_args.c.
References fill_values_arg::argc, fill_values_arg::keys, ST_CONTINUE, and fill_values_arg::vals.
Referenced by setup_parameters_complex().
|
static |
Definition at line 176 of file vm_args.c.
References FALSE, hash(), NIL_P, Qnil, rb_check_hash_type(), rb_extract_keywords(), and TRUE.
Referenced by args_pop_keyword_hash().
|
static |
Definition at line 366 of file vm_args.c.
References Qundef, rb_hash_aset(), and rb_hash_new().
Referenced by args_setup_kw_parameters().
|
static |
Definition at line 352 of file vm_args.c.
References Qundef, rb_ary_push(), and rb_ary_tmp_new().
Referenced by args_setup_kw_parameters().
|
static |
Referenced by refine_sym_proc_call().
NORETURN | ( | static void | raise_argument_errorrb_thread_t *th, const rb_iseq_t *iseq, const VALUE exc | ) |
NORETURN | ( | static void | argument_arity_errorrb_thread_t *th, const rb_iseq_t *iseq, const int miss_argc, const int min_argc, const int max_argc | ) |
NORETURN | ( | static void | argument_kw_errorrb_thread_t *th, const rb_iseq_t *iseq, const char *error, const VALUE keys | ) |
|
static |
Definition at line 701 of file vm_args.c.
References rb_iseq_struct::body, rb_thread_struct::cfp, rb_iseq_constant_body::iseq_encoded, Qfalse, Qnil, rb_exc_raise(), rb_exc_set_backtrace(), rb_ivar_set(), rb_vm_backtrace_object(), rb_vm_pop_frame(), rb_control_frame_struct::sp, VM_BLOCK_HANDLER_NONE, VM_ENV_FLAG_LOCAL, VM_FRAME_MAGIC_DUMMY, and vm_push_frame().
Referenced by argument_arity_error(), and argument_kw_error().
|
static |
Definition at line 794 of file vm_args.c.
References args_info::argc, args_info::argv, CLASS_OF, GET_THREAD, method_missing(), MISSING_NOENTRY, NIL_P, rb_callable_method_entry_with_refinements(), rb_eArgError, rb_raise(), SYM2ID, vm_call0(), and vm_passed_block_handler_set().
Referenced by vm_caller_setup_arg_block().
|
static |
Definition at line 518 of file vm_args.c.
References ALLOCA_N, arg_setup_block, arg_setup_lambda, arg_setup_method, rb_calling_info::argc, fill_values_arg::argc, args_argc(), args_check_block_arg0(), args_extend(), args_kw_argv_to_hash(), args_pop_keyword_hash(), args_reduce(), args_setup_block_parameter(), args_setup_kw_parameters(), args_setup_kw_rest_parameter(), args_setup_lead_parameters(), args_setup_opt_parameters(), args_setup_post_parameters(), args_setup_rest_parameter(), args_stored_kw_argv_to_hash(), argument_arity_error(), rb_iseq_constant_body::block_start, rb_iseq_struct::body, rb_thread_struct::cfp, CHECK_VM_STACK_OVERFLOW, FALSE, fill_keys_values(), rb_call_info::flag, rb_iseq_constant_body::flags, fill_values_arg::keys, rb_iseq_constant_body::keyword, rb_call_info_kw_arg::keyword_len, rb_call_info_kw_arg::keywords, args_info::kw_arg, rb_iseq_constant_body::lead_num, MEMCPY, NIL_P, NULL, rb_iseq_constant_body::opt_num, rb_iseq_constant_body::opt_table, rb_iseq_constant_body::param, rb_iseq_constant_body::post_num, rb_iseq_constant_body::post_start, Qfalse, Qnil, RARRAY_LENINT, rb_hash_foreach(), rb_long2int, rb_iseq_constant_body::rest_start, RHASH_SIZE, rb_iseq_constant_body::size, rb_control_frame_struct::sp, UNLIMITED_ARGUMENTS, fill_values_arg::vals, VM_ASSERT, VM_CALL_ARGS_SPLAT, and VM_CALL_KWARG.
Referenced by vm_callee_setup_arg(), and vm_callee_setup_block_arg().
|
static |
Definition at line 818 of file vm_args.c.
References rb_calling_info::block_handler, rb_captured_block::code, rb_control_frame_struct::ep, rb_call_info::flag, func, GET_BLOCK_HANDLER, rb_captured_block::iseq, NIL_P, NULL, rb_cSymbol, rb_func_proc_new(), rb_hash_aset(), rb_hash_lookup(), rb_method_basic_definition_p(), refine_sym_proc_call(), rb_cref_struct::refinements, rb_control_frame_struct::sp, SYMBOL_P, VM_BH_FROM_ISEQ_BLOCK(), VM_BLOCK_HANDLER_NONE, VM_CALL_ARGS_BLOCKARG, VM_CFP_TO_CAPTURED_BLOCK(), vm_env_cref(), and vm_to_proc().
|
inlinestatic |
Definition at line 756 of file vm_args.c.
References rb_calling_info::argc, rb_call_info_kw_arg::keyword_len, rb_call_info_kw_arg::keywords, rb_call_info_with_kwarg::kw_arg, rb_hash_aset(), rb_hash_new(), and rb_control_frame_struct::sp.
|
inlinestatic |
Definition at line 734 of file vm_args.c.
References args_info::argc, rb_calling_info::argc, args_info::argv, CHECK_VM_STACK_OVERFLOW, len, NIL_P, RARRAY_CONST_PTR, RARRAY_LEN, and rb_control_frame_struct::sp.
Definition at line 775 of file vm_args.c.
References NIL_P, rb_check_convert_type(), rb_eTypeError, rb_obj_classname(), rb_obj_is_proc(), rb_raise(), T_DATA, and UNLIKELY.
Referenced by vm_caller_setup_arg_block().