Ruby
2.5.0dev(2017-10-22revision60238)
|
Go to the source code of this file.
Data Structures | |
struct | METHOD |
struct | cfunc_proc_t |
Macros | |
#define | PROC_NEW_REQUIRES_BLOCK 0 |
#define | NO_CLOBBERED(v) (*(volatile VALUE *)&(v)) |
#define | attached id__attached__ |
#define | IS_METHOD_PROC_IFUNC(ifunc) ((ifunc)->func == bmcall) |
#define | check_argc(argc) (argc) |
#define | MSG(s) rb_fstring_cstr("undefined method `%1$s' for"s" `%2$s'") |
Variables | |
VALUE | rb_cUnboundMethod |
VALUE | rb_cMethod |
VALUE | rb_cBinding |
VALUE | rb_cProc |
const rb_data_type_t | ruby_binding_data_type |
#define attached id__attached__ |
Definition at line 46 of file proc.c.
Referenced by rb_method_name_error().
Definition at line 868 of file proc.c.
Referenced by rb_proc_call().
#define IS_METHOD_PROC_IFUNC | ( | ifunc | ) | ((ifunc)->func == bmcall) |
#define MSG | ( | s | ) | rb_fstring_cstr("undefined method `%1$s' for"s" `%2$s'") |
Referenced by rb_method_name_error().
void Init_Binding | ( | void | ) |
Definition at line 3192 of file proc.c.
References CLASS_OF, rb_cBinding, rb_cObject, rb_define_class(), rb_define_method(), rb_undef_alloc_func(), and rb_undef_method().
void Init_Proc | ( | void | ) |
Definition at line 3050 of file proc.c.
References rb_cObject, rb_cProc, rb_define_class(), rb_define_singleton_method(), and rb_undef_alloc_func().
Definition at line 300 of file proc.c.
References TypedData_Make_Struct.
VALUE rb_binding_new | ( | void | ) |
Definition at line 333 of file proc.c.
References rb_execution_context_struct::cfp, rb_thread_struct::ec, GET_THREAD, and rb_vm_make_binding().
int rb_block_min_max_arity | ( | int * | max | ) |
Definition at line 1070 of file proc.c.
References rb_execution_context_struct::cfp, rb_thread_struct::ec, GET_THREAD, rb_eArgError, rb_raise(), rb_vm_frame_block_handler(), and VM_BLOCK_HANDLER_NONE.
VALUE rb_block_proc | ( | void | ) |
Definition at line 780 of file proc.c.
Referenced by rb_f_trace_var(), and rb_method_call().
Definition at line 1248 of file proc.c.
References PRIsVALUE, rb_obj_class(), and rb_sprintf().
VALUE rb_func_lambda_new | ( | rb_block_call_func_t | func, |
VALUE | val, | ||
int | min_argc, | ||
int | max_argc | ||
) |
Definition at line 676 of file proc.c.
References rb_vm_ifunc_new().
VALUE rb_func_proc_new | ( | rb_block_call_func_t | func, |
VALUE | val | ||
) |
st_index_t rb_hash_proc | ( | st_index_t | hash, |
VALUE | prc | ||
) |
Definition at line 2075 of file proc.c.
References Qnil, rb_block_given_p(), rb_block_proc(), and rb_method_call_with_block().
VALUE rb_method_call_with_block | ( | int | argc, |
const VALUE * | argv, | ||
VALUE | method, | ||
VALUE | passed_procval | ||
) |
Definition at line 2119 of file proc.c.
References GET_THREAD, OBJ_TAINTED, Qundef, rb_eTypeError, rb_raise(), rb_safe_level(), rb_set_safe_level_force(), METHOD::recv, RUBY_SAFE_LEVEL_MAX, and TypedData_Get_Struct.
Referenced by rb_method_call().
int rb_method_entry_arity | ( | const rb_method_entry_t * | me | ) |
VALUE rb_method_entry_location | ( | const rb_method_entry_t * | me | ) |
Definition at line 1642 of file proc.c.
References attached, BUILTIN_TYPE, FL_SINGLETON, FL_TEST, METHOD::klass, MSG, rb_ivar_get(), rb_name_err_raise_str, RB_TYPE_P, T_CLASS, and T_MODULE.
Definition at line 2413 of file proc.c.
Referenced by rb_obj_method_arity().
Definition at line 2501 of file proc.c.
Referenced by rb_obj_method_location().
Definition at line 1338 of file proc.c.
References Qfalse, Qtrue, and rb_typeddata_is_kind_of().
Definition at line 116 of file proc.c.
References METHOD::klass, Qfalse, Qtrue, rb_proc_create(), and rb_typeddata_is_kind_of().
Definition at line 2421 of file proc.c.
References CLASS_OF, and rb_mod_method_arity().
Definition at line 2508 of file proc.c.
References CLASS_OF, and rb_mod_method_location().
Definition at line 1759 of file proc.c.
References METHOD::klass, METHOD::me, NIL_P, rb_check_id(), and rb_singleton_class_get().
Definition at line 109 of file proc.c.
References TypedData_Make_Struct.
Referenced by rb_proc_create(), and rb_proc_create_from_captured().
Definition at line 872 of file proc.c.
References check_argc, GET_THREAD, GetProcPtr, RARRAY_CONST_PTR, RARRAY_LEN, RB_GC_GUARD, rb_vm_invoke_proc(), and VM_BLOCK_HANDLER_NONE.
Referenced by rb_call_end_proc().
Definition at line 892 of file proc.c.
References GET_THREAD, GetProcPtr, and rb_vm_invoke_proc().
VALUE rb_proc_create | ( | VALUE | klass, |
const struct rb_block * | block, | ||
int8_t | safe_level, | ||
int8_t | is_from_method, | ||
int8_t | is_lambda | ||
) |
Definition at line 851 of file vm.c.
References GET_THREAD, rb_proc_alloc(), RTYPEDDATA_DATA, and VM_ASSERT.
Referenced by rb_obj_is_proc().
Definition at line 1086 of file proc.c.
References rb_proc_t::block, GetProcPtr, rb_proc_t::is_lambda, and rb_block::proc.
Definition at line 254 of file proc.c.
References GetProcPtr, rb_proc_t::is_lambda, Qfalse, and Qtrue.
Definition at line 2649 of file proc.c.
References rb_iterate().
Definition at line 1198 of file proc.c.
References id, Qfalse, Qnil, RARRAY_PTR, rb_ary_store(), rb_ary_tmp_new(), rb_gc_register_mark_object(), and SYM2ID.
Referenced by rb_sym_proc_call().
Definition at line 1343 of file vm.c.
References rb_execution_context_struct::cfp, rb_thread_struct::ec, GET_THREAD, NULL, rb_vm_get_ruby_level_next_cfp(), and rb_control_frame_struct::self.
struct vm_ifunc* rb_vm_ifunc_new | ( | VALUE(*)(ANYARGS) | func, |
const void * | data, | ||
int | min_argc, | ||
int | max_argc | ||
) |
Definition at line 640 of file proc.c.
References CHAR_BIT, IFUNC_NEW, rb_eRangeError, rb_raise(), SIZEOF_VALUE, and UNLIMITED_ARGUMENTS.
Referenced by rb_func_lambda_new(), and rb_lambda_call().
VALUE rb_cBinding |
Definition at line 39 of file proc.c.
Referenced by Init_Binding().
VALUE rb_cProc |
Definition at line 40 of file proc.c.
Referenced by Init_Proc().
const rb_data_type_t ruby_binding_data_type |