Ruby
3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
|
#include "eval_intern.h"
#include "gc.h"
#include "internal.h"
#include "internal/class.h"
#include "internal/error.h"
#include "internal/eval.h"
#include "internal/object.h"
#include "internal/proc.h"
#include "internal/symbol.h"
#include "method.h"
#include "iseq.h"
#include "vm_core.h"
Go to the source code of this file.
Data Structures | |
struct | METHOD |
struct | cfunc_proc_t |
Macros | |
#define | NO_CLOBBERED(v) (v) |
#define | UPDATE_TYPED_REFERENCE(_type, _ref) *(_type*)&_ref = (_type)rb_gc_location((VALUE)_ref) |
#define | UPDATE_REFERENCE(_ref) UPDATE_TYPED_REFERENCE(VALUE, _ref) |
#define | attached id__attached__ |
#define | IS_METHOD_PROC_IFUNC(ifunc) ((ifunc)->func == bmcall) |
#define | check_argc(argc) (argc) |
#define | MSG(s) rb_fstring_lit("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 IS_METHOD_PROC_IFUNC | ( | ifunc | ) | ((ifunc)->func == bmcall) |
#define MSG | ( | s | ) | rb_fstring_lit("undefined method `%1$s' for"s" `%2$s'") |
#define UPDATE_REFERENCE | ( | _ref | ) | UPDATE_TYPED_REFERENCE(VALUE, _ref) |
#define UPDATE_TYPED_REFERENCE | ( | _type, | |
_ref | |||
) | *(_type*)&_ref = (_type)rb_gc_location((VALUE)_ref) |
void Init_Binding | ( | void | ) |
Definition at line 4235 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 4082 of file proc.c.
References rb_cObject, rb_cProc, rb_define_class(), rb_define_singleton_method, and rb_undef_alloc_func().
Definition at line 344 of file proc.c.
References ruby_binding_data_type, and TypedData_Make_Struct.
VALUE rb_binding_new | ( | void | ) |
Definition at line 377 of file proc.c.
References rb_execution_context_struct::cfp, GET_EC, and rb_vm_make_binding().
VALUE rb_block_proc | ( | void | ) |
Definition at line 836 of file proc.c.
Referenced by rb_f_trace_var(), rb_method_call(), and rb_method_call_kw().
Definition at line 1495 of file proc.c.
References PRIsVALUE, rb_obj_class(), rb_sprintf(), and str.
Definition at line 2801 of file proc.c.
References rb_obj_is_proc().
Definition at line 3078 of file vm_insnhelper.c.
VALUE rb_func_lambda_new | ( | rb_block_call_func_t | func, |
VALUE | val, | ||
int | min_argc, | ||
int | max_argc | ||
) |
Definition at line 755 of file proc.c.
References vm_ifunc::func, and 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 2404 of file proc.c.
References argc, argv, Qnil, rb_block_given_p(), rb_block_proc(), and rb_method_call_with_block().
Definition at line 2397 of file proc.c.
References argc, argv, Qnil, rb_block_given_p(), rb_block_proc(), and rb_method_call_with_block_kw().
VALUE rb_method_call_with_block | ( | int | argc, |
const VALUE * | argv, | ||
VALUE | method, | ||
VALUE | passed_procval | ||
) |
Definition at line 2440 of file proc.c.
References argc, argv, rb_method_call_with_block_kw(), and RB_NO_KEYWORDS.
Referenced by rb_method_call().
VALUE rb_method_call_with_block_kw | ( | int | argc, |
const VALUE * | argv, | ||
VALUE | method, | ||
VALUE | passed_procval, | ||
int | kw_splat | ||
) |
Definition at line 2427 of file proc.c.
References GET_EC, and TypedData_Get_Struct.
Referenced by rb_method_call_kw(), and rb_method_call_with_block().
const rb_method_definition_t* rb_method_def | ( | VALUE | method | ) |
Definition at line 2816 of file proc.c.
References TypedData_Get_Struct.
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 2883 of file proc.c.
References METHOD::me, and Qnil.
Definition at line 1915 of file proc.c.
References attached, BUILTIN_TYPE, FL_SINGLETON, FL_TEST, METHOD::klass, Qundef, rb_ivar_get(), T_CLASS, and T_MODULE.
Definition at line 1594 of file proc.c.
References rb_typeddata_is_kind_of(), and RBOOL.
Definition at line 170 of file proc.c.
References rb_typeddata_is_kind_of(), and RBOOL.
Referenced by rb_callable_receiver().
Definition at line 2795 of file proc.c.
References CLASS_OF, and rb_mod_method_arity().
Definition at line 2041 of file proc.c.
References METHOD::klass, NIL_P, rb_check_id(), rb_singleton_class_get(), and RCLASS_ORIGIN.
Definition at line 163 of file proc.c.
References TypedData_Make_Struct.
Definition at line 991 of file proc.c.
References check_argc, GET_EC, GetProcPtr, RARRAY_CONST_PTR, RARRAY_LEN, RB_GC_GUARD, RB_NO_KEYWORDS, rb_vm_invoke_proc(), and VM_BLOCK_HANDLER_NONE.
Referenced by rb_call_end_proc().
Definition at line 976 of file proc.c.
References argc, argv, check_argc, GET_EC, GetProcPtr, RARRAY_CONST_PTR, RARRAY_LEN, RB_GC_GUARD, rb_vm_invoke_proc(), and VM_BLOCK_HANDLER_NONE.
Definition at line 1023 of file proc.c.
References argc, argv, RB_NO_KEYWORDS, and rb_proc_call_with_block_kw().
VALUE rb_proc_call_with_block_kw | ( | VALUE | self, |
int | argc, | ||
const VALUE * | argv, | ||
VALUE | passed_procval, | ||
int | kw_splat | ||
) |
Definition at line 1011 of file proc.c.
References argc, argv, GET_EC, GetProcPtr, and rb_vm_invoke_proc().
Referenced by rb_proc_call_with_block().
Definition at line 1246 of file proc.c.
References GetProcPtr, and rb_block::proc.
Referenced by rb_resolve_me_location().
Definition at line 288 of file proc.c.
References GetProcPtr, rb_proc_t::is_lambda, and RBOOL.
VALUE rb_proc_new | ( | rb_block_call_func_t | func, |
VALUE | val | ||
) |
Definition at line 3152 of file proc.c.
References ruby::backward::cxxanyargs::rb_block_call(), and rb_mRubyVMFrozenCore.
Definition at line 1447 of file proc.c.
References id, rb_block::proc, Qfalse, Qnil, RARRAY_AREF, rb_ary_store(), rb_ary_tmp_new(), rb_gc_register_mark_object(), sym, and SYM2ID.
VALUE rb_unnamed_parameters | ( | int | arity | ) |
Definition at line 1397 of file proc.c.
References CONST_ID, ID2SYM, OBJ_FREEZE, rb_ary_new2, rb_ary_new3, rb_ary_push(), and rb_ary_store().
struct vm_ifunc* rb_vm_ifunc_new | ( | rb_block_call_func_t | func, |
const void * | data, | ||
int | min_argc, | ||
int | max_argc | ||
) |
Definition at line 718 of file proc.c.
References vm_ifunc::argc, CHAR_BIT, imemo_ifunc, rb_eRangeError, rb_imemo_new(), rb_raise(), ret, SIZEOF_VALUE, and UNLIMITED_ARGUMENTS.
Referenced by rb_func_lambda_new(), and rb_lambda_call().
VALUE rb_cBinding |
Definition at line 46 of file proc.c.
Referenced by Init_Binding().
VALUE rb_cProc |
Definition at line 47 of file proc.c.
Referenced by Init_Proc().
const rb_data_type_t ruby_binding_data_type |
Definition at line 332 of file proc.c.
Referenced by rb_binding_alloc().