Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
Public APIs related to rb_cRubyVM. More...
#include "ruby/internal/attr/noreturn.h"
#include "ruby/internal/dllexport.h"
#include "ruby/internal/value.h"
Go to the source code of this file.
Macros | |
#define | HAVE_RB_DEFINE_ALLOC_FUNC 1 |
Typedefs | |
typedef VALUE(* | rb_alloc_func_t) (VALUE) |
Public APIs related to rb_cRubyVM.
RBIMPL
or rbimpl
are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will. __VA_ARGS__
is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98. Definition in file vm.h.
Definition at line 1926 of file vm_method.c.
References rb_method_entry_struct::called_id, rb_method_entry_struct::def, rb_method_entry_struct::defined_class, METHOD_ENTRY_VISI, METHOD_VISI_UNDEF, NIL_P, NULL, rb_method_definition_struct::original_id, rb_method_entry_struct::owner, Qnil, rb_class_modify_check(), rb_cObject, rb_eTypeError, rb_method_entry_clone(), RB_OBJ_WRITE, rb_print_undef(), rb_raise(), rb_resolve_refined_method(), RCLASS_SUPER, T_MODULE, UNDEFINED_METHOD_ENTRY_P, UNDEFINED_REFINED_METHOD_P, VM_METHOD_TYPE_ALIAS, VM_METHOD_TYPE_REFINED, and VM_METHOD_TYPE_ZSUPER.
Referenced by Init_signal(), Init_strscan(), and rb_define_alias().
Calls a method.
recv | receiver of the method |
mid | an ID that represents the name of the method |
args | an Array object which contains method arguments |
Definition at line 1044 of file vm_eval.c.
References ALLOCA_N, argc, argv, CALL_FCALL, MEMCPY, OBJ_FREEZE, RARRAY_CONST_PTR, RARRAY_CONST_PTR_TRANSIENT, rb_ary_subseq, rb_funcallv, and RB_GC_GUARD.
Definition at line 1508 of file vm_method.c.
References METHOD_VISI_PRIVATE, METHOD_VISI_PROTECTED, METHOD_VISI_PUBLIC, PRIsVALUE, rb_add_method(), rb_id2str, rb_id_attrset(), rb_intern_str, rb_sprintf(), rb_vm_cref_in_context(), rb_warning(), read(), VM_METHOD_TYPE_ATTRSET, VM_METHOD_TYPE_IVAR, and write().
Referenced by Init_Exception(), Init_ossl_asn1(), Init_ossl_ec(), Init_ossl_pkcs12(), Init_ossl_pkcs7(), Init_ossl_ssl(), Init_ossl_ts(), Init_ossl_x509ext(), Init_ossl_x509store(), and rb_define_attr().
void rb_backtrace | ( | void | ) |
Definition at line 1013 of file vm_backtrace.c.
Definition at line 619 of file vm_eval.c.
References argc, argv, rescue_funcall_args::mid, Qundef, RB_NO_KEYWORDS, and rescue_funcall_args::recv.
Referenced by rb_get_message(), rb_iseq_load_iseq(), rb_range_values(), and rb_time_zone_abbreviation().
Definition at line 613 of file vm_eval.c.
References argc, argv, rescue_funcall_args::kw_splat, rescue_funcall_args::mid, Qundef, and rescue_funcall_args::recv.
void rb_clear_constant_cache | ( | void | ) |
Definition at line 127 of file vm_method.c.
References INC_GLOBAL_CONSTANT_STATE.
Referenced by rb_const_remove(), and rb_const_set().
void rb_clear_method_cache_by_class | ( | VALUE | ) |
void rb_define_alloc_func | ( | VALUE | , |
rb_alloc_func_t | |||
) |
Referenced by Init_Array(), Init_Complex(), Init_Cont(), Init_date_core(), Init_dbm(), Init_Dir(), Init_Encoding(), Init_Exception(), Init_fiddle_closure(), Init_fiddle_function(), Init_fiddle_handle(), Init_fiddle_pinned(), Init_fiddle_pointer(), Init_File(), Init_GC(), Init_gdbm(), Init_generator(), Init_Hash(), Init_IO(), Init_monitor(), Init_ossl_bn(), Init_ossl_cipher(), Init_ossl_digest(), Init_ossl_ec(), Init_ossl_hmac(), Init_ossl_ns_spki(), Init_ossl_ocsp(), Init_ossl_pkcs12(), Init_ossl_pkcs7(), Init_ossl_pkey(), Init_ossl_ssl(), Init_ossl_ssl_session(), Init_ossl_ts(), Init_ossl_x509attr(), Init_ossl_x509cert(), Init_ossl_x509crl(), Init_ossl_x509ext(), Init_ossl_x509name(), Init_ossl_x509req(), Init_ossl_x509revoked(), Init_ossl_x509store(), Init_parser(), Init_psych_emitter(), Init_psych_parser(), Init_Rational(), Init_Regexp(), Init_String(), Init_stringio(), Init_strscan(), Init_Thread(), Init_Time(), Init_vm_backtrace(), Init_win32ole(), Init_win32ole_event(), Init_win32ole_method(), Init_win32ole_param(), Init_win32ole_record(), Init_win32ole_type(), Init_win32ole_typelib(), Init_win32ole_variant(), Init_zlib(), InitVM_console(), InitVM_digest(), InitVM_Enumerator(), InitVM_process(), InitVM_Random(), InitVM_transcode(), and rsock_init_addrinfo().
Definition at line 1909 of file vm_eval.c.
References EC_EXEC_TAG, EC_JUMP_TAG, EC_POP_TAG, EC_PUSH_TAG, NULL, Qnil, RARRAY_CONST_PTR, rb_funcallv_kw(), rb_vm_top_self(), T_STRING, and TAG_NONE.
Definition at line 299 of file vm_method.c.
References Qnil, rb_notimplement(), and UNREACHABLE_RETURN.
Referenced by Init_ossl_ssl(), rb_add_method_cfunc(), and rb_method_definition_set().
Definition at line 2446 of file vm.c.
References rb_ec_frame_method_id_and_class().
rb_alloc_func_t rb_get_alloc_func | ( | VALUE | klass | ) |
Definition at line 960 of file vm_method.c.
References RCLASS_EXT, RCLASS_SUPER, T_CLASS, and UNDEF_ALLOC_FUNC.
VALUE rb_make_backtrace | ( | void | ) |
Definition at line 1059 of file vm_backtrace.c.
References ALL_BACKTRACE_LINES, BACKTRACE_START, and rb_ec_backtrace_str_ary().
Definition at line 2439 of file vm_method.c.
References FALSE, METHOD_ENTRY_BASIC, rb_callable_method_entry(), and TRUE.
Definition at line 2092 of file vm_eval.c.
References argc, argv, RB_NO_KEYWORDS, and rb_captured_block::self.
Definition at line 2124 of file vm_eval.c.
References argc, argv, RB_NO_KEYWORDS, and rb_captured_block::self.
Definition at line 2545 of file vm_method.c.
References rb_ec_obj_respond_to().
Referenced by rb_respond_to().
Definition at line 1357 of file vm_method.c.
References name, and rb_intern().
Definition at line 1351 of file vm_method.c.
Definition at line 2561 of file vm_method.c.
References FALSE, and rb_obj_respond_to().
Referenced by ossl_to_der_if_possible(), rb_econv_prepare_options(), rb_scheduler_close(), rb_scheduler_supports_io_read(), rb_scheduler_supports_io_write(), rb_scheduler_supports_process_wait(), and rb_str_equal().
const char * rb_sourcefile | ( | void | ) |
Definition at line 1571 of file vm.c.
References rb_execution_context_struct::cfp, rb_control_frame_struct::iseq, rb_iseq_path(), rb_vm_get_ruby_level_next_cfp(), and RSTRING_PTR.
Referenced by rb_autoload_load().
int rb_sourceline | ( | void | ) |
Definition at line 1586 of file vm.c.
References rb_execution_context_struct::cfp, rb_vm_get_ruby_level_next_cfp(), and rb_vm_get_sourceline().
void rb_undef_alloc_func | ( | VALUE | klass | ) |
Definition at line 954 of file vm_method.c.
References rb_define_alloc_func(), and UNDEF_ALLOC_FUNC.
Referenced by Init_ast(), Init_bigdecimal(), Init_Binding(), Init_cparse(), Init_ISeq(), Init_Numeric(), Init_objspace(), Init_ossl_engine(), Init_Proc(), Init_Ractor(), Init_String(), Init_VM(), Init_vm_backtrace(), Init_vm_trace(), Init_zlib(), InitVM_Enumerator(), InitVM_process(), InitVM_Random(), InitVM_Struct(), rsock_init_sockifaddr(), and ruby_Init_Continuation_body().