Ruby: vm_core.h File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
vm_core.h File Reference
`#include "ruby/internal/config.h"`
`#include <stddef.h>`
`#include <signal.h>`
`#include <stdarg.h>`
`#include "ruby_assert.h"`
`#include <setjmp.h>`
`#include "ruby/internal/stdbool.h"`
`#include "ccan/list/list.h"`
`#include "id.h"`
`#include "internal.h"`
`#include "internal/array.h"`
`#include "internal/serial.h"`
`#include "internal/vm.h"`
`#include "method.h"`
`#include "node.h"`
`#include "ruby/ruby.h"`
`#include "ruby/st.h"`
`#include "ruby_atomic.h"`
`#include "vm_opts.h"`
`#include "ruby/thread_native.h"`

Go to the source code of this file.

## Data Structures
struct | iseq_inline_constant_cache_entry
struct | iseq_inline_constant_cache
struct | iseq_inline_iv_cache_entry
union | iseq_inline_storage_entry
struct | rb_calling_info
struct | rb_iseq_location_struct
struct | rb_iseq_constant_body
struct | rb_iseq_constant_body::iseq_insn_info
struct | rb_iseq_struct
struct | rb_at_exit_list
struct | rb_hook_list_struct
struct | rb_vm_struct
struct | rb_captured_block
struct | rb_block
struct | rb_control_frame_struct
struct | rb_vm_tag
struct | rb_vm_protect_tag
struct | rb_unblock_callback
struct | rb_ensure_entry
struct | rb_ensure_list
struct | rb_waiting_list
struct | rb_execution_context_struct
struct | rb_ext_config
struct | rb_thread_struct
struct | rb_iseq_new_with_callback_callback_func
struct | rb_proc_t
struct | rb_env_t
struct | rb_binding_t
struct | rb_trace_arg_struct
struct | rb_ractor_pub

## Macros
#define | N_OR_RUBY_DEBUG(n) (((n) > 0) ? (n) : RUBY_DEBUG)
#define | VM_CHECK_MODE N_OR_RUBY_DEBUG(0)
#define | VMDEBUG 0
| VM Debug Level. More...
#define | VM_ASSERT(expr) ((void)0)
#define | VM_UNREACHABLE(func) UNREACHABLE
#define | RUBY_VM_THREAD_MODEL 2
#define | VM_INSN_INFO_TABLE_IMPL 2
#define | NSIG (sizeof(sigset_t) * CHAR_BIT + 1)
#define | RUBY_NSIG NSIG
#define | RUBY_SIGCHLD (0)
#define | SIGCHLD_LOSSY (0)
#define | WAITPID_USE_SIGCHLD (RUBY_SIGCHLD || SIGCHLD_LOSSY)
#define | RB_ALTSTACK_INIT(var, altstack)
#define | RB_ALTSTACK_FREE(var)
#define | RB_ALTSTACK(var) (0)
#define | TAG_NONE RUBY_TAG_NONE
#define | TAG_RETURN RUBY_TAG_RETURN
#define | TAG_BREAK RUBY_TAG_BREAK
#define | TAG_NEXT RUBY_TAG_NEXT
#define | TAG_RETRY RUBY_TAG_RETRY
#define | TAG_REDO RUBY_TAG_REDO
#define | TAG_RAISE RUBY_TAG_RAISE
#define | TAG_THROW RUBY_TAG_THROW
#define | TAG_FATAL RUBY_TAG_FATAL
#define | TAG_MASK RUBY_TAG_MASK
#define | CoreDataFromValue(obj, type) (type*)DATA_PTR(obj)
#define | GetCoreDataFromValue(obj, type, ptr) ((ptr) = CoreDataFromValue((obj), type))
#define | PATHOBJ_PATH 0
#define | PATHOBJ_REALPATH 1
#define | USE_LAZY_LOAD 0
#define | GetVMPtr(obj, ptr) GetCoreDataFromValue((obj), rb_vm_t, (ptr))
#define | VM_GLOBAL_CC_CACHE_TABLE_SIZE 1023
#define | RUBY_VM_SIZE_ALIGN 4096
#define | RUBY_VM_THREAD_VM_STACK_SIZE ( 128 * 1024 * sizeof(VALUE)) /* 512 KB or 1024 KB */
#define | RUBY_VM_THREAD_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE)) /* 8 KB or 16 KB */
#define | RUBY_VM_THREAD_MACHINE_STACK_SIZE ( 128 * 1024 * sizeof(VALUE)) /* 512 KB or 1024 KB */
#define | RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE)) /* 64 KB or 128 KB */
#define | RUBY_VM_FIBER_VM_STACK_SIZE ( 16 * 1024 * sizeof(VALUE)) /* 64 KB or 128 KB */
#define | RUBY_VM_FIBER_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE)) /* 8 KB or 16 KB */
#define | RUBY_VM_FIBER_MACHINE_STACK_SIZE ( 64 * 1024 * sizeof(VALUE)) /* 256 KB or 512 KB */
#define | RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE)) /* 64 KB or 128 KB */
#define | RUBY_VM_THREAD_MACHINE_STACK_SIZE (1024 * 1024 * sizeof(VALUE))
#define | RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN ( 512 * 1024 * sizeof(VALUE))
#define | RUBY_VM_FIBER_MACHINE_STACK_SIZE ( 256 * 1024 * sizeof(VALUE))
#define | RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 128 * 1024 * sizeof(VALUE))
#define | INTEGER_REDEFINED_OP_FLAG (1 << 0)
#define | FLOAT_REDEFINED_OP_FLAG (1 << 1)
#define | STRING_REDEFINED_OP_FLAG (1 << 2)
#define | ARRAY_REDEFINED_OP_FLAG (1 << 3)
#define | HASH_REDEFINED_OP_FLAG (1 << 4)
#define | SYMBOL_REDEFINED_OP_FLAG (1 << 6)
#define | TIME_REDEFINED_OP_FLAG (1 << 7)
#define | REGEXP_REDEFINED_OP_FLAG (1 << 8)
#define | NIL_REDEFINED_OP_FLAG (1 << 9)
#define | TRUE_REDEFINED_OP_FLAG (1 << 10)
#define | FALSE_REDEFINED_OP_FLAG (1 << 11)
#define | PROC_REDEFINED_OP_FLAG (1 << 12)
#define | BASIC_OP_UNREDEFINED_P(op, klass) (LIKELY((GET_VM()->redefined_flag[(op)]&(klass)) == 0))
#define | VM_DEBUG_BP_CHECK 0
#define | VM_DEBUG_VERIFY_METHOD_CACHE (VMDEBUG != 0)
#define | rb_execution_context_t rb_execution_context_t
#define | VM_CORE_H_EC_DEFINED 1
#define | VM_DEFINECLASS_TYPE(x) ((rb_vm_defineclass_type_t)(x) & VM_DEFINECLASS_TYPE_MASK)
#define | VM_DEFINECLASS_FLAG_SCOPED 0x08
#define | VM_DEFINECLASS_FLAG_HAS_SUPERCLASS 0x10
#define | VM_DEFINECLASS_SCOPED_P(x) ((x) & VM_DEFINECLASS_FLAG_SCOPED)
#define | VM_DEFINECLASS_HAS_SUPERCLASS_P(x) ((x) & VM_DEFINECLASS_FLAG_HAS_SUPERCLASS)
#define | GetProcPtr(obj, ptr) GetCoreDataFromValue((obj), rb_proc_t, (ptr))
#define | GetBindingPtr(obj, ptr) GetCoreDataFromValue((obj), rb_binding_t, (ptr))
#define | VM_CHECKMATCH_TYPE_MASK 0x03
#define | VM_CHECKMATCH_ARRAY 0x04
#define | FUNC_FASTCALL(x) x
#define | VM_TAGGED_PTR_SET(p, tag) ((VALUE)(p) | (tag))
#define | VM_TAGGED_PTR_REF(v, mask) ((void *)((v) & ~mask))
#define | GC_GUARDED_PTR(p) VM_TAGGED_PTR_SET((p), 0x01)
#define | GC_GUARDED_PTR_REF(p) VM_TAGGED_PTR_REF((p), 0x03)
#define | GC_GUARDED_PTR_P(p) (((VALUE)(p)) & 0x01)
#define | VM_ENV_DATA_SIZE ( 3)
#define | VM_ENV_DATA_INDEX_ME_CREF (-2) /* ep[-2] */
#define | VM_ENV_DATA_INDEX_SPECVAL (-1) /* ep[-1] */
#define | VM_ENV_DATA_INDEX_FLAGS ( 0) /* ep[ 0] */
#define | VM_ENV_DATA_INDEX_ENV ( 1) /* ep[ 1] */
#define | VM_ENV_INDEX_LAST_LVAR (-VM_ENV_DATA_SIZE)
#define | RUBYVM_CFUNC_FRAME_P(cfp) (VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_CFUNC)
#define | VM_GUARDED_PREV_EP(ep) GC_GUARDED_PTR(ep)
#define | VM_BLOCK_HANDLER_NONE 0
#define | RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp) ((cfp)+1)
#define | RUBY_VM_NEXT_CONTROL_FRAME(cfp) ((cfp)-1)
#define | RUBY_VM_VALID_CONTROL_FRAME_P(cfp, ecfp) ((void *)(ecfp) > (void *)(cfp))
#define | SDR() rb_vmdebug_stack_dump_raw(GET_EC(), GET_EC()->cfp)
#define | SDR2(cfp) rb_vmdebug_stack_dump_raw(GET_EC(), (cfp))
#define | rb_vm_register_special_exception(sp, e, m) rb_vm_register_special_exception_str(sp, e, rb_usascii_str_new_static((m), (long)rb_strlen_lit(m)))
#define | sysstack_error GET_VM()->special_exceptions[ruby_error_sysstack]
#define | CHECK_VM_STACK_OVERFLOW0(cfp, sp, margin)
#define | CHECK_VM_STACK_OVERFLOW(cfp, margin) CHECK_VM_STACK_OVERFLOW0((cfp), (cfp)->sp, (margin))
#define | RUBY_VM_SET_TIMER_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TIMER_INTERRUPT_MASK)
#define | RUBY_VM_SET_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, PENDING_INTERRUPT_MASK)
#define | RUBY_VM_SET_POSTPONED_JOB_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, POSTPONED_JOB_INTERRUPT_MASK)
#define | RUBY_VM_SET_TRAP_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TRAP_INTERRUPT_MASK)
#define | RUBY_VM_SET_TERMINATE_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TERMINATE_INTERRUPT_MASK)
#define | RUBY_VM_SET_VM_BARRIER_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, VM_BARRIER_INTERRUPT_MASK)
#define | RUBY_VM_INTERRUPTED(ec)
#define | RUBY_VM_CHECK_INTS(ec) rb_vm_check_ints(ec)
#define | EXEC_EVENT_HOOK_ORIG(ec_, hooks_, flag_, self_, id_, called_id_, klass_, data_, pop_p_)
#define | EXEC_EVENT_HOOK(ec_, flag_, self_, id_, called_id_, klass_, data_) EXEC_EVENT_HOOK_ORIG(ec_, rb_ec_ractor_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 0)
#define | EXEC_EVENT_HOOK_AND_POP_FRAME(ec_, flag_, self_, id_, called_id_, klass_, data_) EXEC_EVENT_HOOK_ORIG(ec_, rb_ec_ractor_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 1)
#define | RUBY_EVENT_COVERAGE_LINE 0x010000
#define | RUBY_EVENT_COVERAGE_BRANCH 0x020000

## Typedefs
typedef unsigned long | rb_num_t
typedef signed long | rb_snum_t
typedef struct rb_compile_option_struct | rb_compile_option_t
typedef struct rb_iseq_location_struct | rb_iseq_location_t
typedef void | rb_vm_at_exit_func(struct rb_vm_struct *)
typedef struct rb_at_exit_list | rb_at_exit_list
typedef struct rb_hook_list_struct | rb_hook_list_t
typedef const struct rb_builtin_function * | RB_BUILTIN
typedef struct rb_vm_struct | rb_vm_t
typedef struct rb_control_frame_struct | rb_control_frame_t
typedef void * | rb_jmpbuf_t[5]
typedef struct rb_ensure_entry | rb_ensure_entry_t
typedef struct rb_ensure_list | rb_ensure_list_t
typedef char | rb_thread_id_string_t[sizeof(rb_nativethread_id_t) *2+3]
typedef struct rb_fiber_struct | rb_fiber_t
typedef struct rb_execution_context_struct | rb_execution_context_t
typedef struct rb_ractor_struct | rb_ractor_t
typedef struct rb_thread_struct | rb_thread_t
typedef struct iseq_inline_constant_cache * | IC
typedef struct iseq_inline_iv_cache_entry * | IVC
typedef union iseq_inline_storage_entry * | ISE
typedef const struct rb_callinfo * | CALL_INFO
typedef const struct rb_callcache * | CALL_CACHE
typedef struct rb_call_data * | CALL_DATA
typedef VALUE | CDHASH
typedef rb_control_frame_t *FUNC_FASTCALL | rb_insn_func_t(rb_execution_context_t *, rb_control_frame_t *)
typedef void(* | ruby_sighandler_t) (int)
typedef int | rb_backtrace_iter_func(void *, VALUE, int, VALUE)

## Enumerations
enum | ruby_tag_type { RUBY_TAG_NONE = 0x0 , RUBY_TAG_RETURN = 0x1 , RUBY_TAG_BREAK = 0x2 , RUBY_TAG_NEXT = 0x3 , RUBY_TAG_RETRY = 0x4 , RUBY_TAG_REDO = 0x5 , RUBY_TAG_RAISE = 0x6 , RUBY_TAG_THROW = 0x7 , RUBY_TAG_FATAL = 0x8 , RUBY_TAG_MASK = 0xf }
enum | ruby_vm_throw_flags { VM_THROW_NO_ESCAPE_FLAG = 0x8000 , VM_THROW_STATE_MASK = 0xff }
enum | ruby_special_exceptions { ruby_error_reenter , ruby_error_nomemory , ruby_error_sysstack , ruby_error_stackfatal , ruby_error_stream_closed , ruby_special_error_count }
enum | ruby_basic_operators { BOP_PLUS , BOP_MINUS , BOP_MULT , BOP_DIV , BOP_MOD , BOP_EQ , BOP_EQQ , BOP_LT , BOP_LE , BOP_LTLT , BOP_AREF , BOP_ASET , BOP_LENGTH , BOP_SIZE , BOP_EMPTY_P , BOP_NIL_P , BOP_SUCC , BOP_GT , BOP_GE , BOP_NOT , BOP_NEQ , BOP_MATCH , BOP_FREEZE , BOP_UMINUS , BOP_MAX , BOP_MIN , BOP_CALL , BOP_AND , BOP_OR , BOP_LAST_ }
enum | rb_block_handler_type { block_handler_type_iseq , block_handler_type_ifunc , block_handler_type_symbol , block_handler_type_proc }
enum | rb_block_type { block_type_iseq , block_type_ifunc , block_type_symbol , block_type_proc }
enum | rb_thread_status { THREAD_RUNNABLE , THREAD_STOPPED , THREAD_STOPPED_FOREVER , THREAD_KILLED }
enum | rb_vm_defineclass_type_t { VM_DEFINECLASS_TYPE_CLASS = 0x00 , VM_DEFINECLASS_TYPE_SINGLETON_CLASS = 0x01 , VM_DEFINECLASS_TYPE_MODULE = 0x02 , VM_DEFINECLASS_TYPE_MASK = 0x07 }
enum | vm_check_match_type { VM_CHECKMATCH_TYPE_WHEN = 1 , VM_CHECKMATCH_TYPE_CASE = 2 , VM_CHECKMATCH_TYPE_RESCUE = 3 }
enum | vm_special_object_type { VM_SPECIAL_OBJECT_VMCORE = 1 , VM_SPECIAL_OBJECT_CBASE , VM_SPECIAL_OBJECT_CONST_BASE }
enum | vm_svar_index { VM_SVAR_LASTLINE = 0 , VM_SVAR_BACKREF = 1 , VM_SVAR_EXTRA_START = 2 , VM_SVAR_FLIPFLOP_START = 2 }
enum | { VM_FRAME_MAGIC_METHOD = 0x11110001 , VM_FRAME_MAGIC_BLOCK = 0x22220001 , VM_FRAME_MAGIC_CLASS = 0x33330001 , VM_FRAME_MAGIC_TOP = 0x44440001 , VM_FRAME_MAGIC_CFUNC = 0x55550001 , VM_FRAME_MAGIC_IFUNC = 0x66660001 , VM_FRAME_MAGIC_EVAL = 0x77770001 , VM_FRAME_MAGIC_RESCUE = 0x78880001 , VM_FRAME_MAGIC_DUMMY = 0x79990001 , VM_FRAME_MAGIC_MASK = 0x7fff0001 , VM_FRAME_FLAG_FINISH = 0x0020 , VM_FRAME_FLAG_BMETHOD = 0x0040 , VM_FRAME_FLAG_CFRAME = 0x0080 , VM_FRAME_FLAG_LAMBDA = 0x0100 , VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM = 0x0200 , VM_FRAME_FLAG_CFRAME_KW = 0x0400 , VM_FRAME_FLAG_PASSED = 0x0800 , VM_ENV_FLAG_LOCAL = 0x0002 , VM_ENV_FLAG_ESCAPED = 0x0004 , VM_ENV_FLAG_WB_REQUIRED = 0x0008 , VM_ENV_FLAG_ISOLATED = 0x0010 }
enum | { TIMER_INTERRUPT_MASK = 0x01 , PENDING_INTERRUPT_MASK = 0x02 , POSTPONED_JOB_INTERRUPT_MASK = 0x04 , TRAP_INTERRUPT_MASK = 0x08 , TERMINATE_INTERRUPT_MASK = 0x10 , VM_BARRIER_INTERRUPT_MASK = 0x20 }

## Functions
void | rb_vm_encoded_insn_data_table_init (void)
struct rb_objspace * | rb_objspace_alloc (void)
void | rb_objspace_free (struct rb_objspace *)
void | rb_objspace_call_finalizer (struct rb_objspace *)
| STATIC_ASSERT (rb_vm_tag_buf_offset, offsetof(struct rb_vm_tag, buf) > 0)
| STATIC_ASSERT (rb_vm_tag_buf_end, offsetof(struct rb_vm_tag, buf)+sizeof(rb_jmpbuf_t)< sizeof(struct rb_vm_tag))
void | rb_ec_set_vm_stack (rb_execution_context_t *ec, VALUE *stack, size_t size)
void | rb_ec_initialize_vm_stack (rb_execution_context_t *ec, VALUE *stack, size_t size)
void | rb_ec_clear_vm_stack (rb_execution_context_t *ec)
rb_iseq_t * | rb_iseq_new (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, enum iseq_type)
rb_iseq_t * | rb_iseq_new_top (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent)
rb_iseq_t * | rb_iseq_new_main (const rb_ast_body_t *ast, VALUE path, VALUE realpath, const rb_iseq_t *parent)
rb_iseq_t * | rb_iseq_new_eval (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno, const rb_iseq_t *parent, int isolated_depth)
rb_iseq_t * | rb_iseq_new_with_opt (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno, const rb_iseq_t *parent, int isolated_depth, enum iseq_type, const rb_compile_option_t *)
rb_iseq_t * | rb_iseq_new_with_callback (const struct rb_iseq_new_with_callback_callback_func *ifunc, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno, const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t *)
VALUE | rb_iseq_disasm (const rb_iseq_t *iseq)
int | rb_iseq_disasm_insn (VALUE str, const VALUE *iseqval, size_t pos, const rb_iseq_t *iseq, VALUE child)
| Disassemble a instruction Iseq -> Iseq inspect object. More...
VALUE | rb_iseq_coverage (const rb_iseq_t *iseq)
VALUE | rb_proc_isolate (VALUE self)
VALUE | rb_proc_isolate_bang (VALUE self)
VALUE | rb_proc_ractor_make_shareable (VALUE self)
const VALUE * | rb_vm_ep_local_ep (const VALUE *ep)
const VALUE * | rb_vm_proc_local_ep (VALUE proc)
void | rb_vm_block_ep_update (VALUE obj, const struct rb_block *dst, const VALUE *ep)
void | rb_vm_block_copy (VALUE obj, const struct rb_block *dst, const struct rb_block *src)
VALUE | rb_vm_frame_block_handler (const rb_control_frame_t *cfp)
VALUE | rb_thread_alloc (VALUE klass)
VALUE | rb_binding_alloc (VALUE klass)
VALUE | rb_proc_alloc (VALUE klass)
VALUE | rb_proc_dup (VALUE self)
void | rb_vmdebug_stack_dump_raw (const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
void | rb_vmdebug_debug_print_pre (const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE *_pc)
void | rb_vmdebug_debug_print_post (const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
void | rb_vm_bugreport (const void *)
void | rb_bug_for_fatal_signal (ruby_sighandler_t default_sighandler, int sig, const void *, const char *fmt,...)
VALUE | rb_iseq_eval (const rb_iseq_t *iseq)
VALUE | rb_iseq_eval_main (const rb_iseq_t *iseq)
VALUE | rb_iseq_path (const rb_iseq_t *iseq)
VALUE | rb_iseq_realpath (const rb_iseq_t *iseq)
VALUE | rb_iseq_pathobj_new (VALUE path, VALUE realpath)
void | rb_iseq_pathobj_set (const rb_iseq_t *iseq, VALUE path, VALUE realpath)
int | rb_ec_frame_method_id_and_class (const rb_execution_context_t *ec, ID *idp, ID *called_idp, VALUE *klassp)
void | rb_ec_setup_exception (const rb_execution_context_t *ec, VALUE mesg, VALUE cause)
VALUE | rb_vm_invoke_proc (rb_execution_context_t *ec, rb_proc_t *proc, int argc, const VALUE *argv, int kw_splat, VALUE block_handler)
VALUE | rb_vm_make_proc_lambda (const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass, int8_t is_lambda)
VALUE | rb_vm_make_binding (const rb_execution_context_t *ec, const rb_control_frame_t *src_cfp)
VALUE | rb_vm_env_local_variables (const rb_env_t *env)
const rb_env_t * | rb_vm_env_prev_env (const rb_env_t *env)
const VALUE * | rb_binding_add_dynavars (VALUE bindval, rb_binding_t *bind, int dyncount, const ID *dynvars)
void | rb_vm_inc_const_missing_count (void)
VALUE | rb_vm_call_kw (rb_execution_context_t *ec, VALUE recv, VALUE id, int argc, const VALUE *argv, const rb_callable_method_entry_t *me, int kw_splat)
void | rb_vm_pop_frame (rb_execution_context_t *ec)
void | rb_gvl_destroy (rb_global_vm_lock_t *gvl)
void | rb_thread_start_timer_thread (void)
void | rb_thread_stop_timer_thread (void)
void | rb_thread_reset_timer_thread (void)
void | rb_thread_wakeup_timer_thread (int)
rb_control_frame_t * | rb_vm_get_ruby_level_next_cfp (const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
rb_control_frame_t * | rb_vm_get_binding_creatable_next_cfp (const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
int | rb_vm_get_sourceline (const rb_control_frame_t *)
void | rb_vm_stack_to_heap (rb_execution_context_t *ec)
void | ruby_thread_init_stack (rb_thread_t *th)
int | rb_vm_control_frame_id_and_class (const rb_control_frame_t *cfp, ID *idp, ID *called_idp, VALUE *klassp)
void | rb_vm_rewind_cfp (rb_execution_context_t *ec, rb_control_frame_t *cfp)
VALUE | rb_vm_bh_to_procval (const rb_execution_context_t *ec, VALUE block_handler)
void | rb_vm_register_special_exception_str (enum ruby_special_exceptions sp, VALUE exception_class, VALUE mesg)
void | rb_gc_mark_machine_stack (const rb_execution_context_t *ec)
void | rb_vm_rewrite_cref (rb_cref_t *node, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr)
const rb_callable_method_entry_t * | rb_vm_frame_method_entry (const rb_control_frame_t *cfp)
VALUE | rb_catch_protect (VALUE t, rb_block_call_func *func, VALUE data, enum ruby_tag_type *stateptr)
rb_execution_context_t * | rb_vm_main_ractor_ec (rb_vm_t *vm)
VALUE | rb_exc_set_backtrace (VALUE exc, VALUE bt)
int | rb_signal_buff_size (void)
int | rb_signal_exec (rb_thread_t *th, int sig)
void | rb_threadptr_check_signal (rb_thread_t *mth)
void | rb_threadptr_signal_raise (rb_thread_t *th, int sig)
void | rb_threadptr_signal_exit (rb_thread_t *th)
int | rb_threadptr_execute_interrupts (rb_thread_t *, int)
void | rb_threadptr_interrupt (rb_thread_t *th)
void | rb_threadptr_unlock_all_locking_mutexes (rb_thread_t *th)
void | rb_threadptr_pending_interrupt_clear (rb_thread_t *th)
void | rb_threadptr_pending_interrupt_enque (rb_thread_t *th, VALUE v)
VALUE | rb_ec_get_errinfo (const rb_execution_context_t *ec)
void | rb_ec_error_print (rb_execution_context_t *volatile ec, volatile VALUE errinfo)
void | rb_execution_context_update (const rb_execution_context_t *ec)
void | rb_execution_context_mark (const rb_execution_context_t *ec)
void | rb_fiber_close (rb_fiber_t *fib)
void | Init_native_thread (rb_thread_t *th)
int | rb_vm_check_ints_blocking (rb_execution_context_t *ec)
void | rb_vm_cond_wait (rb_vm_t *vm, rb_nativethread_cond_t *cond)
void | rb_vm_cond_timedwait (rb_vm_t *vm, rb_nativethread_cond_t *cond, unsigned long msec)
void | rb_hook_list_mark (rb_hook_list_t *hooks)
void | rb_hook_list_free (rb_hook_list_t *hooks)
void | rb_hook_list_connect_tracepoint (VALUE target, rb_hook_list_t *list, VALUE tpval, unsigned int target_line)
void | rb_hook_list_remove_tracepoint (rb_hook_list_t *list, VALUE tpval)
void | rb_exec_event_hooks (struct rb_trace_arg_struct *trace_arg, rb_hook_list_t *hooks, int pop_p)
void | rb_vm_trap_exit (rb_vm_t *vm)
int | rb_thread_check_trap_pending (void)
VALUE | rb_get_coverages (void)
void | rb_set_coverages (VALUE, int, VALUE)
void | rb_clear_coverages (void)
void | rb_reset_coverages (void)
void | rb_postponed_job_flush (rb_vm_t *vm)

## Variables
const rb_data_type_t | ruby_threadptr_data_type
VALUE | rb_cISeq
VALUE | rb_cRubyVM
VALUE | rb_mRubyVMFrozenCore
VALUE | rb_block_param_proxy
const rb_data_type_t | ruby_binding_data_type
VALUE | rb_eRactorUnsafeError
VALUE | rb_eRactorIsolationError

## Macro Definition Documentation

## ◆ ARRAY_REDEFINED_OP_FLAG

#define ARRAY_REDEFINED_OP_FLAG (1 << 3)

Definition at line 715 of file vm_core.h.

## ◆ BASIC_OP_UNREDEFINED_P

#define BASIC_OP_UNREDEFINED_P | ( |  | op,
|  |  | klass
| ) |  | (LIKELY((GET_VM()->redefined_flag[(op)]&(klass)) == 0))

Definition at line 726 of file vm_core.h.

## ◆ CHECK_VM_STACK_OVERFLOW

#define CHECK_VM_STACK_OVERFLOW | ( |  | cfp,
|  |  | margin
| ) |  | CHECK_VM_STACK_OVERFLOW0((cfp), (cfp)->sp, (margin))

Definition at line 1740 of file vm_core.h.

## ◆ CHECK_VM_STACK_OVERFLOW0

#define CHECK_VM_STACK_OVERFLOW0 | ( |  | cfp,
|  |  | sp,
|  |  | margin
| ) |  |

Value:
do { \
STATIC_ASSERT(sizeof_sp, sizeof(*(sp)) == sizeof(VALUE)); \
STATIC_ASSERT(sizeof_cfp, sizeof(*(cfp)) == sizeof(rb_control_frame_t)); \
const struct rb_control_frame_struct *bound = (void *)&(sp)[(margin)]; \
if (UNLIKELY((cfp) <= &bound[1])) { \
vm_stackoverflow(); \
} \
} while (0)
UNLIKELY
#define UNLIKELY(x)
Definition: ffi_common.h:126
rb_control_frame_struct
Definition: vm_core.h:769
rb_control_frame_struct::sp
VALUE * sp
Definition: vm_core.h:771
VALUE
unsigned long VALUE
Definition: value.h:38

Definition at line 1731 of file vm_core.h.

## ◆ CoreDataFromValue

#define CoreDataFromValue | ( |  | obj,
|  |  | type
| ) |  | (type*)DATA_PTR(obj)

Definition at line 260 of file vm_core.h.

## ◆ EXEC_EVENT_HOOK

#define EXEC_EVENT_HOOK | ( |  | ec_,
|  |  | flag_,
|  |  | self_,
|  |  | id_,
|  |  | called_id_,
|  |  | klass_,
|  |  | data_
| ) |  | EXEC_EVENT_HOOK_ORIG(ec_, rb_ec_ractor_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 0)

Definition at line 2001 of file vm_core.h.

## ◆ EXEC_EVENT_HOOK_AND_POP_FRAME

#define EXEC_EVENT_HOOK_AND_POP_FRAME | ( |  | ec_,
|  |  | flag_,
|  |  | self_,
|  |  | id_,
|  |  | called_id_,
|  |  | klass_,
|  |  | data_
| ) |  | EXEC_EVENT_HOOK_ORIG(ec_, rb_ec_ractor_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 1)

Definition at line 2004 of file vm_core.h.

## ◆ EXEC_EVENT_HOOK_ORIG

#define EXEC_EVENT_HOOK_ORIG | ( |  | ec_,
|  |  | hooks_,
|  |  | flag_,
|  |  | self_,
|  |  | id_,
|  |  | called_id_,
|  |  | klass_,
|  |  | data_,
|  |  | pop_p_
| ) |  |

Value:
do { \
const rb_event_flag_t flag_arg_ = (flag_); \
rb_hook_list_t *hooks_arg_ = (hooks_); \
if (UNLIKELY((hooks_arg_)->events & (flag_arg_))) { \
/* defer evaluating the other arguments */ \
rb_exec_event_hook_orig(ec_, hooks_arg_, flag_arg_, self_, id_, called_id_, klass_, data_, pop_p_); \
} \
} while (0)
rb_event_flag_t
uint32_t rb_event_flag_t
Definition: event.h:66
rb_hook_list_struct
Definition: vm_core.h:553

Definition at line 1957 of file vm_core.h.

## ◆ FALSE_REDEFINED_OP_FLAG

#define FALSE_REDEFINED_OP_FLAG (1 << 11)

Definition at line 723 of file vm_core.h.

## ◆ FLOAT_REDEFINED_OP_FLAG

#define FLOAT_REDEFINED_OP_FLAG (1 << 1)

Definition at line 713 of file vm_core.h.

## ◆ FUNC_FASTCALL

#define FUNC_FASTCALL | ( |  | x | ) | x

Definition at line 1154 of file vm_core.h.

## ◆ GC_GUARDED_PTR

#define GC_GUARDED_PTR | ( |  | p | ) | VM_TAGGED_PTR_SET((p), 0x01)

Definition at line 1163 of file vm_core.h.

## ◆ GC_GUARDED_PTR_P

#define GC_GUARDED_PTR_P | ( |  | p | ) | (((VALUE)(p)) & 0x01)

Definition at line 1165 of file vm_core.h.

## ◆ GC_GUARDED_PTR_REF

#define GC_GUARDED_PTR_REF | ( |  | p | ) | VM_TAGGED_PTR_REF((p), 0x03)

Definition at line 1164 of file vm_core.h.

## ◆ GetBindingPtr

#define GetBindingPtr | ( |  | obj,
|  |  | ptr
| ) |  | GetCoreDataFromValue((obj), rb_binding_t, (ptr))

Definition at line 1109 of file vm_core.h.

## ◆ GetCoreDataFromValue

#define GetCoreDataFromValue | ( |  | obj,
|  |  | type,
|  |  | ptr
| ) |  | ((ptr) = CoreDataFromValue((obj), type))

Definition at line 264 of file vm_core.h.

## ◆ GetProcPtr

#define GetProcPtr | ( |  | obj,
|  |  | ptr
| ) |  | GetCoreDataFromValue((obj), rb_proc_t, (ptr))

Definition at line 1083 of file vm_core.h.

## ◆ GetVMPtr

#define GetVMPtr | ( |  | obj,
|  |  | ptr
| ) |  | GetCoreDataFromValue((obj), rb_vm_t, (ptr))

Definition at line 537 of file vm_core.h.

## ◆ HASH_REDEFINED_OP_FLAG

#define HASH_REDEFINED_OP_FLAG (1 << 4)

Definition at line 716 of file vm_core.h.

## ◆ INTEGER_REDEFINED_OP_FLAG

#define INTEGER_REDEFINED_OP_FLAG (1 << 0)

Definition at line 712 of file vm_core.h.

## ◆ N_OR_RUBY_DEBUG

#define N_OR_RUBY_DEBUG | ( |  | n | ) | (((n) > 0) ? (n) : RUBY_DEBUG)

Definition at line 21 of file vm_core.h.

## ◆ NIL_REDEFINED_OP_FLAG

#define NIL_REDEFINED_OP_FLAG (1 << 9)

Definition at line 721 of file vm_core.h.

## ◆ NSIG

#define NSIG (sizeof(sigset_t) * CHAR_BIT + 1)

Definition at line 111 of file vm_core.h.

## ◆ PATHOBJ_PATH

#define PATHOBJ_PATH 0

Definition at line 275 of file vm_core.h.

## ◆ PATHOBJ_REALPATH

#define PATHOBJ_REALPATH 1

Definition at line 276 of file vm_core.h.

## ◆ PROC_REDEFINED_OP_FLAG

#define PROC_REDEFINED_OP_FLAG (1 << 12)

Definition at line 724 of file vm_core.h.

## ◆ RB_ALTSTACK

#define RB_ALTSTACK | ( |  | var | ) | (0)

Definition at line 144 of file vm_core.h.

## ◆ RB_ALTSTACK_FREE

#define RB_ALTSTACK_FREE | ( |  | var | ) |

Definition at line 143 of file vm_core.h.

## ◆ RB_ALTSTACK_INIT

#define RB_ALTSTACK_INIT | ( |  | var,
|  |  | altstack
| ) |  |

Definition at line 142 of file vm_core.h.

## ◆ rb_execution_context_t

#define rb_execution_context_t rb_execution_context_t

Definition at line 910 of file vm_core.h.

## ◆ rb_vm_register_special_exception

#define rb_vm_register_special_exception | ( |  | sp,
|  |  | e,
|  |  | m
| ) |  | rb_vm_register_special_exception_str(sp, e, rb_usascii_str_new_static((m), (long)rb_strlen_lit(m)))

Definition at line 1720 of file vm_core.h.

## ◆ REGEXP_REDEFINED_OP_FLAG

#define REGEXP_REDEFINED_OP_FLAG (1 << 8)

Definition at line 720 of file vm_core.h.

## ◆ RUBY_EVENT_COVERAGE_BRANCH

#define RUBY_EVENT_COVERAGE_BRANCH 0x020000

Definition at line 2023 of file vm_core.h.

## ◆ RUBY_EVENT_COVERAGE_LINE

#define RUBY_EVENT_COVERAGE_LINE 0x010000

Definition at line 2022 of file vm_core.h.

## ◆ RUBY_NSIG

#define RUBY_NSIG NSIG

Definition at line 114 of file vm_core.h.

## ◆ RUBY_SIGCHLD

#define RUBY_SIGCHLD (0)

Definition at line 121 of file vm_core.h.

## ◆ RUBY_VM_CHECK_INTS

#define RUBY_VM_CHECK_INTS | ( |  | ec | ) | rb_vm_check_ints(ec)

Definition at line 1921 of file vm_core.h.

## ◆ RUBY_VM_FIBER_MACHINE_STACK_SIZE [1/2]

#define RUBY_VM_FIBER_MACHINE_STACK_SIZE ( 64 * 1024 * sizeof(VALUE)) /* 256 KB or 512 KB */

Definition at line 706 of file vm_core.h.

## ◆ RUBY_VM_FIBER_MACHINE_STACK_SIZE [2/2]

#define RUBY_VM_FIBER_MACHINE_STACK_SIZE ( 256 * 1024 * sizeof(VALUE))

Definition at line 706 of file vm_core.h.

## ◆ RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN [1/2]

#define RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE)) /* 64 KB or 128 KB */

Definition at line 708 of file vm_core.h.

## ◆ RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN [2/2]

#define RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 128 * 1024 * sizeof(VALUE))

Definition at line 708 of file vm_core.h.

## ◆ RUBY_VM_FIBER_VM_STACK_SIZE

#define RUBY_VM_FIBER_VM_STACK_SIZE ( 16 * 1024 * sizeof(VALUE)) /* 64 KB or 128 KB */

Definition at line 690 of file vm_core.h.

## ◆ RUBY_VM_FIBER_VM_STACK_SIZE_MIN

#define RUBY_VM_FIBER_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE)) /* 8 KB or 16 KB */

Definition at line 691 of file vm_core.h.

## ◆ RUBY_VM_INTERRUPTED

#define RUBY_VM_INTERRUPTED | ( |  | ec | ) |

Value:
((ec)->interrupt_flag & ~(ec)->interrupt_mask & \
(PENDING_INTERRUPT_MASK|TRAP_INTERRUPT_MASK))
TRAP_INTERRUPT_MASK
@ TRAP_INTERRUPT_MASK
Definition: vm_core.h:1870
PENDING_INTERRUPT_MASK
@ PENDING_INTERRUPT_MASK
Definition: vm_core.h:1868

Definition at line 1881 of file vm_core.h.

## ◆ RUBY_VM_NEXT_CONTROL_FRAME

#define RUBY_VM_NEXT_CONTROL_FRAME | ( |  | cfp | ) | ((cfp)-1)

Definition at line 1393 of file vm_core.h.

## ◆ RUBY_VM_PREVIOUS_CONTROL_FRAME

#define RUBY_VM_PREVIOUS_CONTROL_FRAME | ( |  | cfp | ) | ((cfp)+1)

Definition at line 1392 of file vm_core.h.

## ◆ RUBY_VM_SET_INTERRUPT

#define RUBY_VM_SET_INTERRUPT | ( |  | ec | ) | ATOMIC_OR((ec)->interrupt_flag, PENDING_INTERRUPT_MASK)

Definition at line 1876 of file vm_core.h.

## ◆ RUBY_VM_SET_POSTPONED_JOB_INTERRUPT

#define RUBY_VM_SET_POSTPONED_JOB_INTERRUPT | ( |  | ec | ) | ATOMIC_OR((ec)->interrupt_flag, POSTPONED_JOB_INTERRUPT_MASK)

Definition at line 1877 of file vm_core.h.

## ◆ RUBY_VM_SET_TERMINATE_INTERRUPT

#define RUBY_VM_SET_TERMINATE_INTERRUPT | ( |  | ec | ) | ATOMIC_OR((ec)->interrupt_flag, TERMINATE_INTERRUPT_MASK)

Definition at line 1879 of file vm_core.h.

## ◆ RUBY_VM_SET_TIMER_INTERRUPT

#define RUBY_VM_SET_TIMER_INTERRUPT | ( |  | ec | ) | ATOMIC_OR((ec)->interrupt_flag, TIMER_INTERRUPT_MASK)

Definition at line 1875 of file vm_core.h.

## ◆ RUBY_VM_SET_TRAP_INTERRUPT

#define RUBY_VM_SET_TRAP_INTERRUPT | ( |  | ec | ) | ATOMIC_OR((ec)->interrupt_flag, TRAP_INTERRUPT_MASK)

Definition at line 1878 of file vm_core.h.

## ◆ RUBY_VM_SET_VM_BARRIER_INTERRUPT

#define RUBY_VM_SET_VM_BARRIER_INTERRUPT | ( |  | ec | ) | ATOMIC_OR((ec)->interrupt_flag, VM_BARRIER_INTERRUPT_MASK)

Definition at line 1880 of file vm_core.h.

## ◆ RUBY_VM_SIZE_ALIGN

#define RUBY_VM_SIZE_ALIGN 4096

Definition at line 683 of file vm_core.h.

## ◆ RUBY_VM_THREAD_MACHINE_STACK_SIZE [1/2]

#define RUBY_VM_THREAD_MACHINE_STACK_SIZE ( 128 * 1024 * sizeof(VALUE)) /* 512 KB or 1024 KB */

Definition at line 702 of file vm_core.h.

## ◆ RUBY_VM_THREAD_MACHINE_STACK_SIZE [2/2]

#define RUBY_VM_THREAD_MACHINE_STACK_SIZE (1024 * 1024 * sizeof(VALUE))

Definition at line 702 of file vm_core.h.

## ◆ RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN [1/2]

#define RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE)) /* 64 KB or 128 KB */

Definition at line 704 of file vm_core.h.

## ◆ RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN [2/2]

#define RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN ( 512 * 1024 * sizeof(VALUE))

Definition at line 704 of file vm_core.h.

## ◆ RUBY_VM_THREAD_MODEL

#define RUBY_VM_THREAD_MODEL 2

Definition at line 88 of file vm_core.h.

## ◆ RUBY_VM_THREAD_VM_STACK_SIZE

#define RUBY_VM_THREAD_VM_STACK_SIZE ( 128 * 1024 * sizeof(VALUE)) /* 512 KB or 1024 KB */

Definition at line 685 of file vm_core.h.

## ◆ RUBY_VM_THREAD_VM_STACK_SIZE_MIN

#define RUBY_VM_THREAD_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE)) /* 8 KB or 16 KB */

Definition at line 686 of file vm_core.h.

## ◆ RUBY_VM_VALID_CONTROL_FRAME_P

#define RUBY_VM_VALID_CONTROL_FRAME_P | ( |  | cfp,
|  |  | ecfp
| ) |  | ((void *)(ecfp) > (void *)(cfp))

Definition at line 1395 of file vm_core.h.

## ◆ RUBYVM_CFUNC_FRAME_P

#define RUBYVM_CFUNC_FRAME_P | ( |  | cfp | ) | (VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_CFUNC)

Definition at line 1295 of file vm_core.h.

## ◆ SDR

#define SDR | ( |  | ) | rb_vmdebug_stack_dump_raw(GET_EC(), GET_EC()->cfp)

Definition at line 1647 of file vm_core.h.

## ◆ SDR2

#define SDR2 | ( |  | cfp | ) | rb_vmdebug_stack_dump_raw(GET_EC(), (cfp))

Definition at line 1648 of file vm_core.h.

## ◆ SIGCHLD_LOSSY

#define SIGCHLD_LOSSY (0)

Definition at line 128 of file vm_core.h.

## ◆ STRING_REDEFINED_OP_FLAG

#define STRING_REDEFINED_OP_FLAG (1 << 2)

Definition at line 714 of file vm_core.h.

## ◆ SYMBOL_REDEFINED_OP_FLAG

#define SYMBOL_REDEFINED_OP_FLAG (1 << 6)

Definition at line 718 of file vm_core.h.

## ◆ sysstack_error

#define sysstack_error GET_VM()->special_exceptions[ruby_error_sysstack]

Definition at line 1729 of file vm_core.h.

## ◆ TAG_BREAK

#define TAG_BREAK RUBY_TAG_BREAK

Definition at line 200 of file vm_core.h.

## ◆ TAG_FATAL

#define TAG_FATAL RUBY_TAG_FATAL

Definition at line 206 of file vm_core.h.

## ◆ TAG_MASK

#define TAG_MASK RUBY_TAG_MASK

Definition at line 207 of file vm_core.h.

## ◆ TAG_NEXT

#define TAG_NEXT RUBY_TAG_NEXT

Definition at line 201 of file vm_core.h.

## ◆ TAG_NONE

#define TAG_NONE RUBY_TAG_NONE

Definition at line 198 of file vm_core.h.

## ◆ TAG_RAISE

#define TAG_RAISE RUBY_TAG_RAISE

Definition at line 204 of file vm_core.h.

## ◆ TAG_REDO

#define TAG_REDO RUBY_TAG_REDO

Definition at line 203 of file vm_core.h.

## ◆ TAG_RETRY

#define TAG_RETRY RUBY_TAG_RETRY

Definition at line 202 of file vm_core.h.

## ◆ TAG_RETURN

#define TAG_RETURN RUBY_TAG_RETURN

Definition at line 199 of file vm_core.h.

## ◆ TAG_THROW

#define TAG_THROW RUBY_TAG_THROW

Definition at line 205 of file vm_core.h.

## ◆ TIME_REDEFINED_OP_FLAG

#define TIME_REDEFINED_OP_FLAG (1 << 7)

Definition at line 719 of file vm_core.h.

## ◆ TRUE_REDEFINED_OP_FLAG

#define TRUE_REDEFINED_OP_FLAG (1 << 10)

Definition at line 722 of file vm_core.h.

## ◆ USE_LAZY_LOAD

#define USE_LAZY_LOAD 0

Definition at line 466 of file vm_core.h.

## ◆ VM_ASSERT

#define VM_ASSERT | ( |  | expr | ) | ((void)0)

Definition at line 61 of file vm_core.h.

## ◆ VM_BLOCK_HANDLER_NONE

#define VM_BLOCK_HANDLER_NONE 0

Definition at line 1299 of file vm_core.h.

## ◆ VM_CHECK_MODE

#define VM_CHECK_MODE N_OR_RUBY_DEBUG(0)

Definition at line 23 of file vm_core.h.

## ◆ VM_CHECKMATCH_ARRAY

#define VM_CHECKMATCH_ARRAY 0x04

Definition at line 1127 of file vm_core.h.

## ◆ VM_CHECKMATCH_TYPE_MASK

#define VM_CHECKMATCH_TYPE_MASK 0x03

Definition at line 1126 of file vm_core.h.

## ◆ VM_CORE_H_EC_DEFINED

#define VM_CORE_H_EC_DEFINED 1

Definition at line 914 of file vm_core.h.

## ◆ VM_DEBUG_BP_CHECK

#define VM_DEBUG_BP_CHECK 0

Definition at line 729 of file vm_core.h.

## ◆ VM_DEBUG_VERIFY_METHOD_CACHE

#define VM_DEBUG_VERIFY_METHOD_CACHE (VMDEBUG != 0)

Definition at line 733 of file vm_core.h.

## ◆ VM_DEFINECLASS_FLAG_HAS_SUPERCLASS

#define VM_DEFINECLASS_FLAG_HAS_SUPERCLASS 0x10

Definition at line 1038 of file vm_core.h.

## ◆ VM_DEFINECLASS_FLAG_SCOPED

#define VM_DEFINECLASS_FLAG_SCOPED 0x08

Definition at line 1037 of file vm_core.h.

## ◆ VM_DEFINECLASS_HAS_SUPERCLASS_P

#define VM_DEFINECLASS_HAS_SUPERCLASS_P | ( |  | x | ) | ((x) & VM_DEFINECLASS_FLAG_HAS_SUPERCLASS)

Definition at line 1040 of file vm_core.h.

## ◆ VM_DEFINECLASS_SCOPED_P

#define VM_DEFINECLASS_SCOPED_P | ( |  | x | ) | ((x) & VM_DEFINECLASS_FLAG_SCOPED)

Definition at line 1039 of file vm_core.h.

## ◆ VM_DEFINECLASS_TYPE

#define VM_DEFINECLASS_TYPE | ( |  | x | ) | ((rb_vm_defineclass_type_t)(x) & VM_DEFINECLASS_TYPE_MASK)

Definition at line 1036 of file vm_core.h.

## ◆ VM_ENV_DATA_INDEX_ENV

#define VM_ENV_DATA_INDEX_ENV ( 1) /* ep[ 1] */

Definition at line 1211 of file vm_core.h.

## ◆ VM_ENV_DATA_INDEX_FLAGS

#define VM_ENV_DATA_INDEX_FLAGS ( 0) /* ep[ 0] */

Definition at line 1210 of file vm_core.h.

## ◆ VM_ENV_DATA_INDEX_ME_CREF

#define VM_ENV_DATA_INDEX_ME_CREF (-2) /* ep[-2] */

Definition at line 1208 of file vm_core.h.

## ◆ VM_ENV_DATA_INDEX_SPECVAL

#define VM_ENV_DATA_INDEX_SPECVAL (-1) /* ep[-1] */

Definition at line 1209 of file vm_core.h.

## ◆ VM_ENV_DATA_SIZE

#define VM_ENV_DATA_SIZE ( 3)

Definition at line 1206 of file vm_core.h.

## ◆ VM_ENV_INDEX_LAST_LVAR

#define VM_ENV_INDEX_LAST_LVAR (-VM_ENV_DATA_SIZE)

Definition at line 1213 of file vm_core.h.

## ◆ VM_GLOBAL_CC_CACHE_TABLE_SIZE

#define VM_GLOBAL_CC_CACHE_TABLE_SIZE 1023

Definition at line 662 of file vm_core.h.

## ◆ VM_GUARDED_PREV_EP

#define VM_GUARDED_PREV_EP | ( |  | ep | ) | GC_GUARDED_PTR(ep)

Definition at line 1298 of file vm_core.h.

## ◆ VM_INSN_INFO_TABLE_IMPL

#define VM_INSN_INFO_TABLE_IMPL 2

Definition at line 97 of file vm_core.h.

## ◆ VM_TAGGED_PTR_REF

#define VM_TAGGED_PTR_REF | ( |  | v,
|  |  | mask
| ) |  | ((void *)((v) & ~mask))

Definition at line 1161 of file vm_core.h.

## ◆ VM_TAGGED_PTR_SET

#define VM_TAGGED_PTR_SET | ( |  | p,
|  |  | tag
| ) |  | ((VALUE)(p) | (tag))

Definition at line 1160 of file vm_core.h.

## ◆ VM_UNREACHABLE

#define VM_UNREACHABLE | ( |  | func | ) | UNREACHABLE

Definition at line 62 of file vm_core.h.

## ◆ VMDEBUG

#define VMDEBUG 0

VM Debug Level.

debug level: 0: no debug output 1: show instruction name 2: show stack frame when control stack frame is changed 3: show stack status 4: show register 5: 10: gc check

Definition at line 40 of file vm_core.h.

## ◆ WAITPID_USE_SIGCHLD

#define WAITPID_USE_SIGCHLD (RUBY_SIGCHLD || SIGCHLD_LOSSY)

Definition at line 132 of file vm_core.h.

## Typedef Documentation

## ◆ CALL_CACHE

typedef const struct rb_callcache* CALL_CACHE

Definition at line 1148 of file vm_core.h.

## ◆ CALL_DATA

typedef struct rb_call_data* CALL_DATA

Definition at line 1149 of file vm_core.h.

## ◆ CALL_INFO

typedef const struct rb_callinfo* CALL_INFO

Definition at line 1147 of file vm_core.h.

## ◆ CDHASH

typedef VALUE CDHASH

Definition at line 1151 of file vm_core.h.

## ◆ IC

typedef struct iseq_inline_constant_cache* IC

Definition at line 1144 of file vm_core.h.

## ◆ ISE

typedef union iseq_inline_storage_entry* ISE

Definition at line 1146 of file vm_core.h.

## ◆ IVC

typedef struct iseq_inline_iv_cache_entry* IVC

Definition at line 1145 of file vm_core.h.

## ◆ rb_at_exit_list

typedef struct rb_at_exit_list rb_at_exit_list

## ◆ rb_backtrace_iter_func

typedef int rb_backtrace_iter_func(void *, VALUE, int, VALUE)

Definition at line 1708 of file vm_core.h.

## ◆ RB_BUILTIN

typedef const struct rb_builtin_function* RB_BUILTIN

Definition at line 562 of file vm_core.h.

## ◆ rb_compile_option_t

typedef struct rb_compile_option_struct rb_compile_option_t

Definition at line 219 of file vm_core.h.

## ◆ rb_control_frame_t

typedef struct rb_control_frame_struct rb_control_frame_t

## ◆ rb_ensure_entry_t

typedef struct rb_ensure_entry rb_ensure_entry_t

## ◆ rb_ensure_list_t

typedef struct rb_ensure_list rb_ensure_list_t

## ◆ rb_execution_context_t

typedef struct rb_execution_context_struct rb_execution_context_t

Definition at line 909 of file vm_core.h.

## ◆ rb_fiber_t

typedef struct rb_fiber_struct rb_fiber_t

Definition at line 846 of file vm_core.h.

## ◆ rb_hook_list_t

typedef struct rb_hook_list_struct rb_hook_list_t

## ◆ rb_insn_func_t

typedef rb_control_frame_t *FUNC_FASTCALL rb_insn_func_t(rb_execution_context_t *, rb_control_frame_t *)

Definition at line 1158 of file vm_core.h.

## ◆ rb_iseq_location_t

typedef struct rb_iseq_location_struct rb_iseq_location_t

## ◆ rb_jmpbuf_t

typedef void* rb_jmpbuf_t[5]

Definition at line 801 of file vm_core.h.

## ◆ rb_num_t

typedef unsigned long rb_num_t

Definition at line 182 of file vm_core.h.

## ◆ rb_ractor_t

typedef struct rb_ractor_struct rb_ractor_t

Definition at line 933 of file vm_core.h.

## ◆ rb_snum_t

typedef signed long rb_snum_t

Definition at line 183 of file vm_core.h.

## ◆ rb_thread_id_string_t

typedef char rb_thread_id_string_t[sizeof(rb_nativethread_id_t) *2+3]

Definition at line 844 of file vm_core.h.

## ◆ rb_thread_t

typedef struct rb_thread_struct rb_thread_t

## ◆ rb_vm_at_exit_func

typedef void rb_vm_at_exit_func(struct rb_vm_struct *)

Definition at line 541 of file vm_core.h.

## ◆ rb_vm_t

typedef struct rb_vm_struct rb_vm_t

## ◆ ruby_sighandler_t

typedef void(* ruby_sighandler_t) (int)

Definition at line 1650 of file vm_core.h.

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
VM_FRAME_MAGIC_METHOD |
VM_FRAME_MAGIC_BLOCK |
VM_FRAME_MAGIC_CLASS |
VM_FRAME_MAGIC_TOP |
VM_FRAME_MAGIC_CFUNC |
VM_FRAME_MAGIC_IFUNC |
VM_FRAME_MAGIC_EVAL |
VM_FRAME_MAGIC_RESCUE |
VM_FRAME_MAGIC_DUMMY |
VM_FRAME_MAGIC_MASK |
VM_FRAME_FLAG_FINISH |
VM_FRAME_FLAG_BMETHOD |
VM_FRAME_FLAG_CFRAME |
VM_FRAME_FLAG_LAMBDA |
VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM |
VM_FRAME_FLAG_CFRAME_KW |
VM_FRAME_FLAG_PASSED |
VM_ENV_FLAG_LOCAL |
VM_ENV_FLAG_ESCAPED |
VM_ENV_FLAG_WB_REQUIRED |
VM_ENV_FLAG_ISOLATED |

Definition at line 1167 of file vm_core.h.

## ◆ anonymous enum

anonymous enum

Enumerator
TIMER_INTERRUPT_MASK |
PENDING_INTERRUPT_MASK |
POSTPONED_JOB_INTERRUPT_MASK |
TRAP_INTERRUPT_MASK |
TERMINATE_INTERRUPT_MASK |
VM_BARRIER_INTERRUPT_MASK |

Definition at line 1866 of file vm_core.h.

## ◆ rb_block_handler_type

enum rb_block_handler_type

Enumerator
block_handler_type_iseq |
block_handler_type_ifunc |
block_handler_type_symbol |
block_handler_type_proc |

Definition at line 746 of file vm_core.h.

## ◆ rb_block_type

enum rb_block_type

Enumerator
block_type_iseq |
block_type_ifunc |
block_type_symbol |
block_type_proc |

Definition at line 753 of file vm_core.h.

## ◆ rb_thread_status

enum rb_thread_status

Enumerator
THREAD_RUNNABLE |
THREAD_STOPPED |
THREAD_STOPPED_FOREVER |
THREAD_KILLED |

Definition at line 791 of file vm_core.h.

## ◆ rb_vm_defineclass_type_t

enum rb_vm_defineclass_type_t

Enumerator
VM_DEFINECLASS_TYPE_CLASS |
VM_DEFINECLASS_TYPE_SINGLETON_CLASS |
VM_DEFINECLASS_TYPE_MODULE |
VM_DEFINECLASS_TYPE_MASK |

Definition at line 1028 of file vm_core.h.

## ◆ ruby_basic_operators

enum ruby_basic_operators

Enumerator
BOP_PLUS |
BOP_MINUS |
BOP_MULT |
BOP_DIV |
BOP_MOD |
BOP_EQ |
BOP_EQQ |
BOP_LT |
BOP_LE |
BOP_LTLT |
BOP_AREF |
BOP_ASET |
BOP_LENGTH |
BOP_SIZE |
BOP_EMPTY_P |
BOP_NIL_P |
BOP_SUCC |
BOP_GT |
BOP_GE |
BOP_NOT |
BOP_NEQ |
BOP_MATCH |
BOP_FREEZE |
BOP_UMINUS |
BOP_MAX |
BOP_MIN |
BOP_CALL |
BOP_AND |
BOP_OR |
BOP_LAST_ |

Definition at line 503 of file vm_core.h.

## ◆ ruby_special_exceptions

enum ruby_special_exceptions

Enumerator
ruby_error_reenter |
ruby_error_nomemory |
ruby_error_sysstack |
ruby_error_stackfatal |
ruby_error_stream_closed |
ruby_special_error_count |

Definition at line 494 of file vm_core.h.

## ◆ ruby_tag_type

enum ruby_tag_type

Enumerator
RUBY_TAG_NONE |
RUBY_TAG_RETURN |
RUBY_TAG_BREAK |
RUBY_TAG_NEXT |
RUBY_TAG_RETRY |
RUBY_TAG_REDO |
RUBY_TAG_RAISE |
RUBY_TAG_THROW |
RUBY_TAG_FATAL |
RUBY_TAG_MASK |

Definition at line 185 of file vm_core.h.

## ◆ ruby_vm_throw_flags

enum ruby_vm_throw_flags

Enumerator
VM_THROW_NO_ESCAPE_FLAG |
VM_THROW_STATE_MASK |

Definition at line 209 of file vm_core.h.

## ◆ vm_check_match_type

enum vm_check_match_type

Enumerator
VM_CHECKMATCH_TYPE_WHEN |
VM_CHECKMATCH_TYPE_CASE |
VM_CHECKMATCH_TYPE_RESCUE |

Definition at line 1120 of file vm_core.h.

## ◆ vm_special_object_type

enum vm_special_object_type

Enumerator
VM_SPECIAL_OBJECT_VMCORE |
VM_SPECIAL_OBJECT_CBASE |
VM_SPECIAL_OBJECT_CONST_BASE |

Definition at line 1129 of file vm_core.h.

## ◆ vm_svar_index

enum vm_svar_index

Enumerator
VM_SVAR_LASTLINE |
VM_SVAR_BACKREF |
VM_SVAR_EXTRA_START |
VM_SVAR_FLIPFLOP_START |

Definition at line 1135 of file vm_core.h.

## Function Documentation

## ◆ Init_native_thread()

void Init_native_thread | ( | rb_thread_t * | th | ) |

Referenced by Init_BareVM().

## ◆ rb_binding_add_dynavars()

const VALUE * rb_binding_add_dynavars | ( | VALUE | bindval,
|  | rb_binding_t * | bind,
|  | int | dyncount,
|  | const ID * | dynvars
| ) |  |

Definition at line 1203 of file vm.c.

References ALLOCV_END, ALLOCV_N, rb_binding_t::block, rb_iseq_struct::body, rb_execution_context_struct::cfp, rb_ast_body_struct::compile_option, env, rb_iseq_location_struct::label, rb_ast_body_struct::line_count, rb_iseq_constant_body::location, MEMCPY, NODE_SCOPE, NULL, numberof, rb_binding_t::pathobj, rb_fstring_lit, rb_iseq_new(), rb_iseq_new_top(), rb_node_init(), rb_vm_pop_frame(), and rb_ast_body_struct::root.

## ◆ rb_binding_alloc()

VALUE rb_binding_alloc | ( | VALUE | klass | ) |

Definition at line 331 of file proc.c.

References ruby_binding_data_type, and TypedData_Make_Struct.

Referenced by rb_vm_make_binding().

## ◆ rb_catch_protect()

VALUE rb_catch_protect | ( | VALUE | t,
|  | rb_block_call_func * | func,
|  | VALUE | data,
|  | enum ruby_tag_type * | stateptr
| ) |  |

Definition at line 2421 of file vm_eval.c.

References t.

## ◆ rb_clear_coverages()

void rb_clear_coverages | ( | void |  | ) |

Definition at line 4739 of file thread.c.

References rb_get_coverages(), rb_hash_foreach(), and RTEST.

Referenced by rb_reset_coverages().

## ◆ rb_ec_clear_vm_stack()

void rb_ec_clear_vm_stack | ( | rb_execution_context_t * | ec | ) |

Definition at line 3047 of file vm.c.

References rb_execution_context_struct::cfp, NULL, and rb_ec_set_vm_stack().

Referenced by rb_threadptr_root_fiber_terminate().

## ◆ rb_ec_error_print()

void rb_ec_error_print | ( | rb_execution_context_t *volatile | ec,
|  | volatile VALUE | errinfo
| ) |  |

Definition at line 360 of file eval_error.c.

References EC_EXEC_TAG, EC_POP_TAG, EC_PUSH_TAG, rb_execution_context_struct::errinfo, NIL_P, Qfalse, Qnil, Qundef, rb_execution_context_struct::raised_flag, rb_ec_raised_clear, rb_ec_raised_set, rb_error_write(), rb_get_backtrace(), rb_get_message(), and TAG_NONE.

Referenced by rb_f_abort().

## ◆ rb_ec_frame_method_id_and_class()

int rb_ec_frame_method_id_and_class | ( | const rb_execution_context_t * | ec,
|  | ID * | idp,
|  | ID * | called_idp,
|  | VALUE * | klassp
| ) |  |

Definition at line 2440 of file vm.c.

References rb_execution_context_struct::cfp, and rb_vm_control_frame_id_and_class().

Referenced by rb_dtrace_setup(), and rb_frame_method_id_and_class().

## ◆ rb_ec_get_errinfo()

VALUE rb_ec_get_errinfo | ( | const rb_execution_context_t * | ec | ) |

Definition at line 1881 of file eval.c.

References rb_execution_context_struct::errinfo, and ptr.

Referenced by rb_f_abort().

## ◆ rb_ec_initialize_vm_stack()

void rb_ec_initialize_vm_stack | ( | rb_execution_context_t * | ec,
|  | VALUE * | stack,
|  | size_t | size
| ) |  |

Definition at line 3031 of file vm.c.

References rb_execution_context_struct::cfp, NULL, Qnil, rb_ec_set_vm_stack(), VM_BLOCK_HANDLER_NONE, VM_ENV_FLAG_LOCAL, VM_FRAME_FLAG_CFRAME, VM_FRAME_FLAG_FINISH, VM_FRAME_MAGIC_DUMMY, rb_execution_context_struct::vm_stack, and rb_execution_context_struct::vm_stack_size.

## ◆ rb_ec_set_vm_stack()

void rb_ec_set_vm_stack | ( | rb_execution_context_t * | ec,
|  | VALUE * | stack,
|  | size_t | size
| ) |  |
| inline

Definition at line 3024 of file vm.c.

References rb_execution_context_struct::vm_stack, and rb_execution_context_struct::vm_stack_size.

Referenced by rb_ec_clear_vm_stack(), and rb_ec_initialize_vm_stack().

## ◆ rb_ec_setup_exception()

void rb_ec_setup_exception | ( | const rb_execution_context_t * | ec,
|  | VALUE | mesg,
|  | VALUE | cause
| ) |  |

Definition at line 683 of file eval.c.

References get_ec_errinfo, id_cause, Qundef, and rb_ivar_set().

## ◆ rb_exec_event_hooks()

void rb_exec_event_hooks | ( | struct rb_trace_arg_struct * | trace_arg,
|  | rb_hook_list_t * | hooks,
|  | int | pop_p
| ) |  |

Definition at line 365 of file vm_trace.c.

References rb_execution_context_struct::cfp, rb_trace_arg_struct::ec, EC_JUMP_TAG, rb_execution_context_struct::errinfo, rb_trace_arg_struct::event, rb_execution_context_struct::local_storage_recursive_hash, rb_execution_context_struct::local_storage_recursive_hash_for_trace, NULL, rb_vm_tag::prev, Qnil, rb_mRubyVMFrozenCore, rb_vm_pop_frame(), RUBY_INTERNAL_EVENT_MASK, rb_trace_arg_struct::self, rb_execution_context_struct::tag, TAG_NONE, rb_execution_context_struct::trace_arg, and UNLIKELY.

## ◆ rb_execution_context_mark()

void rb_execution_context_mark | ( | const rb_execution_context_t * | ec | ) |

Definition at line 2835 of file vm.c.

References rb_control_frame_struct::block_code, rb_execution_context_struct::cfp, rb_control_frame_struct::ep, rb_execution_context_struct::errinfo, rb_control_frame_struct::iseq, rb_execution_context_struct::local_storage, rb_execution_context_struct::local_storage_recursive_hash, rb_execution_context_struct::local_storage_recursive_hash_for_trace, rb_execution_context_struct::machine, NULL, rb_execution_context_struct::private_const_reference, rb_gc_mark(), rb_gc_mark_locations(), rb_gc_mark_machine_stack(), rb_gc_mark_movable(), rb_gc_mark_vm_stack_values(), rb_id_table_foreach_values(), rb_execution_context_struct::root_svar, RUBY_MARK_UNLESS_NULL, RUBY_VM_PREVIOUS_CONTROL_FRAME, rb_control_frame_struct::self, rb_control_frame_struct::sp, rb_execution_context_struct::stack_end, rb_execution_context_struct::stack_start, VM_ASSERT, VM_ENV_DATA_INDEX_ENV, VM_ENV_DATA_INDEX_ME_CREF, VM_ENV_FLAG_ESCAPED, rb_execution_context_struct::vm_stack, and rb_execution_context_struct::vm_stack_size.

Referenced by rb_fiber_mark_self().

## ◆ rb_execution_context_update()

void rb_execution_context_update | ( | const rb_execution_context_t * | ec | ) |

Definition at line 2785 of file vm.c.

References rb_control_frame_struct::block_code, rb_execution_context_struct::cfp, rb_control_frame_struct::ep, rb_control_frame_struct::iseq, long(), rb_gc_location(), RUBY_VM_PREVIOUS_CONTROL_FRAME, rb_control_frame_struct::self, rb_control_frame_struct::sp, VM_ASSERT, VM_ENV_DATA_INDEX_ENV, VM_ENV_DATA_INDEX_ME_CREF, VM_ENV_FLAG_ESCAPED, rb_execution_context_struct::vm_stack, and rb_execution_context_struct::vm_stack_size.

Referenced by rb_fiber_update_self().

## ◆ rb_fiber_close()

void rb_fiber_close | ( | rb_fiber_t * | fib | ) |

Definition at line 2365 of file cont.c.

References FIBER_TERMINATED.

## ◆ rb_gc_mark_machine_stack()

void rb_gc_mark_machine_stack | ( | const rb_execution_context_t * | ec | ) |

Definition at line 5869 of file gc.c.

References GET_STACK_BOUNDS, and rb_objspace.

Referenced by rb_execution_context_mark().

## ◆ rb_get_coverages()

VALUE rb_get_coverages | ( | void |  | ) |

Definition at line 5773 of file thread.c.

Referenced by rb_clear_coverages().

## ◆ rb_gvl_destroy()

void rb_gvl_destroy | ( | rb_global_vm_lock_t * | gvl | ) |

## ◆ rb_hook_list_connect_tracepoint()

void rb_hook_list_connect_tracepoint | ( | VALUE | target,
|  | rb_hook_list_t * | list,
|  | VALUE | tpval,
|  | unsigned int | target_line
| ) |  |

Definition at line 1258 of file vm_trace.c.

References rb_tp_struct::events, FALSE, rb_event_hook_struct::filter, RUBY_EVENT_HOOK_FLAG_RAW_ARG, RUBY_EVENT_HOOK_FLAG_SAFE, and rb_event_hook_struct::target_line.

## ◆ rb_hook_list_free()

void rb_hook_list_free | ( | rb_hook_list_t * | hooks | ) |

Definition at line 69 of file vm_trace.c.

References rb_hook_list_struct::need_clean, and TRUE.

Referenced by rb_iseq_free().

## ◆ rb_hook_list_mark()

void rb_hook_list_mark | ( | rb_hook_list_t * | hooks | ) |

Definition at line 56 of file vm_trace.c.

References rb_event_hook_struct::data, rb_hook_list_struct::hooks, rb_event_hook_struct::next, and rb_gc_mark().

Referenced by rb_iseq_mark().

## ◆ rb_hook_list_remove_tracepoint()

void rb_hook_list_remove_tracepoint | ( | rb_hook_list_t * | list,
|  | VALUE | tpval
| ) |  |

Definition at line 1268 of file vm_trace.c.

References rb_event_hook_struct::data, rb_hook_list_struct::events, rb_event_hook_struct::events, rb_event_hook_struct::hook_flags, rb_hook_list_struct::hooks, rb_hook_list_struct::need_clean, rb_event_hook_struct::next, RUBY_EVENT_HOOK_FLAG_DELETED, and TRUE.

## ◆ rb_iseq_coverage()

VALUE rb_iseq_coverage | ( | const rb_iseq_t * | iseq | ) |

Definition at line 1146 of file iseq.c.

References ISEQ_COVERAGE.

## ◆ rb_iseq_disasm()

VALUE rb_iseq_disasm | ( | const rb_iseq_t * | iseq | ) |

Definition at line 2335 of file iseq.c.

References rb_str_new, rb_str_resize(), RSTRING_LEN, and str.

Referenced by rb_iseq_add_local_tracepoint_recursively().

## ◆ rb_iseq_disasm_insn()

int rb_iseq_disasm_insn | ( | VALUE | str,
|  | const VALUE * | iseqval,
|  | size_t | pos,
|  | const rb_iseq_t * | iseq,
|  | VALUE | child
| ) |  |

Disassemble a instruction Iseq -> Iseq inspect object.

Definition at line 2078 of file iseq.c.

References len, PRIuSIZE, rb_insn_operand_intern(), rb_iseq_event_flags(), rb_iseq_line_no(), rb_str_cat2, rb_str_catf(), rb_str_concat(), rb_str_new, RSTRING_LEN, RSTRING_PTR, RUBY_EVENT_B_CALL, RUBY_EVENT_B_RETURN, RUBY_EVENT_C_CALL, RUBY_EVENT_C_RETURN, RUBY_EVENT_CALL, RUBY_EVENT_CLASS, RUBY_EVENT_COVERAGE_BRANCH, RUBY_EVENT_COVERAGE_LINE, RUBY_EVENT_END, RUBY_EVENT_LINE, RUBY_EVENT_RETURN, str, and types.

Referenced by rb_vmdebug_debug_print_pre().

## ◆ rb_iseq_eval()

VALUE rb_iseq_eval | ( | const rb_iseq_t * | iseq | ) |

Definition at line 2403 of file vm.c.

References vm_exec.

Referenced by rb_load_with_builtin_functions().

## ◆ rb_iseq_eval_main()

VALUE rb_iseq_eval_main | ( | const rb_iseq_t * | iseq | ) |

Definition at line 2413 of file vm.c.

References vm_exec.

## ◆ rb_iseq_new()

rb_iseq_t * rb_iseq_new | ( | const rb_ast_body_t * | ast,
|  | VALUE | name,
|  | VALUE | path,
|  | VALUE | realpath,
|  | const rb_iseq_t * | parent,
|  | enum | iseq_type
| ) |  |

Definition at line 809 of file iseq.c.

References INT2FIX, name, and rb_iseq_new_with_opt().

Referenced by Init_VM(), rb_binding_add_dynavars(), and rb_vm_call_cfunc().

## ◆ rb_iseq_new_eval()

rb_iseq_t * rb_iseq_new_eval | ( | const rb_ast_body_t * | ast,
|  | VALUE | name,
|  | VALUE | path,
|  | VALUE | realpath,
|  | VALUE | first_lineno,
|  | const rb_iseq_t * | parent,
|  | int | isolated_depth
| ) |  |

Definition at line 841 of file iseq.c.

References rb_iseq_constant_body::ISEQ_TYPE_EVAL, name, and rb_iseq_new_with_opt().

## ◆ rb_iseq_new_main()

rb_iseq_t * rb_iseq_new_main | ( | const rb_ast_body_t * | ast,
|  | VALUE | path,
|  | VALUE | realpath,
|  | const rb_iseq_t * | parent
| ) |  |

Definition at line 833 of file iseq.c.

References INT2FIX, rb_iseq_constant_body::ISEQ_TYPE_MAIN, rb_fstring_lit, and rb_iseq_new_with_opt().

## ◆ rb_iseq_new_top()

rb_iseq_t * rb_iseq_new_top | ( | const rb_ast_body_t * | ast,
|  | VALUE | name,
|  | VALUE | path,
|  | VALUE | realpath,
|  | const rb_iseq_t * | parent
| ) |  |

Definition at line 817 of file iseq.c.

References rb_iseq_constant_body::coverage, COVERAGE_TARGET_ONESHOT_LINES, INT2FIX, rb_iseq_constant_body::ISEQ_TYPE_TOP, len, rb_ast_body_struct::line_count, name, rb_default_coverage(), rb_get_coverage_mode(), rb_get_coverages(), rb_hash_aset(), rb_iseq_new_with_opt(), and RTEST.

Referenced by rb_binding_add_dynavars().

## ◆ rb_iseq_new_with_callback()

rb_iseq_t * rb_iseq_new_with_callback | ( | const struct rb_iseq_new_with_callback_callback_func * | ifunc,
|  | VALUE | name,
|  | VALUE | path,
|  | VALUE | realpath,
|  | VALUE | first_lineno,
|  | const rb_iseq_t * | parent,
|  | enum | iseq_type,
|  | const rb_compile_option_t * | option
| ) |  |

Definition at line 888 of file iseq.c.

References iseq_alloc(), name, NULL, and rb_iseq_compile_callback().

## ◆ rb_iseq_new_with_opt()

rb_iseq_t * rb_iseq_new_with_opt | ( | const rb_ast_body_t * | ast,
|  | VALUE | name,
|  | VALUE | path,
|  | VALUE | realpath,
|  | VALUE | first_lineno,
|  | const rb_iseq_t * | parent,
|  | int | isolated_depth,
|  | enum | iseq_type,
|  | const rb_compile_option_t * | option
| ) |  |

Definition at line 862 of file iseq.c.

References rb_ast_body_struct::compile_option, iseq_alloc(), name, RNode::nd_loc, nd_node_id, NULL, rb_iseq_compile_node(), and rb_ast_body_struct::root.

Referenced by rb_iseq_new(), rb_iseq_new_eval(), rb_iseq_new_main(), and rb_iseq_new_top().

## ◆ rb_iseq_path()

VALUE rb_iseq_path | ( | const rb_iseq_t * | iseq | ) |

Definition at line 1087 of file iseq.c.

References rb_iseq_struct::body, rb_iseq_constant_body::location, and rb_iseq_location_struct::pathobj.

Referenced by rb_block_to_s(), rb_method_definition_set(), rb_profile_frame_path(), rb_resolve_me_location(), rb_source_location(), and rb_sourcefile().

## ◆ rb_iseq_pathobj_new()

VALUE rb_iseq_pathobj_new | ( | VALUE | path,
|  | VALUE | realpath
| ) |  |

Definition at line 502 of file iseq.c.

References NIL_P, Qnil, rb_ary_new_from_args, rb_fstring(), rb_obj_freeze(), rb_str_cmp(), T_STRING, and VM_ASSERT.

Referenced by rb_iseq_pathobj_set().

## ◆ rb_iseq_pathobj_set()

void rb_iseq_pathobj_set | ( | const rb_iseq_t * | iseq,
|  | VALUE | path,
|  | VALUE | realpath
| ) |  |

Definition at line 521 of file iseq.c.

References rb_iseq_struct::body, rb_iseq_constant_body::location, rb_iseq_location_struct::pathobj, rb_iseq_pathobj_new(), and RB_OBJ_WRITE.

Referenced by rb_vm_set_progname().

## ◆ rb_iseq_realpath()

VALUE rb_iseq_realpath | ( | const rb_iseq_t * | iseq | ) |

Definition at line 1093 of file iseq.c.

References rb_iseq_struct::body, rb_iseq_constant_body::location, and rb_iseq_location_struct::pathobj.

Referenced by rb_current_realfilepath(), rb_iseq_absolute_path(), rb_profile_frame_absolute_path(), and rb_vm_set_progname().

## ◆ rb_objspace_alloc()

struct rb_objspace * rb_objspace_alloc | ( | void |  | ) |

Definition at line 1595 of file gc.c.

References dont_gc_on, rb_objspace::eden_heap, malloc_limit, ruby_gc_params_t::malloc_limit_min, rb_heap_struct::pages, and rb_objspace::tomb_heap.

Referenced by Init_BareVM().

## ◆ rb_objspace_call_finalizer()

void rb_objspace_call_finalizer | ( | struct rb_objspace * | objspace | ) |

Definition at line 3771 of file gc.c.

References RVALUE::as, ATOMIC_EXCHANGE, ATOMIC_SET, BUILTIN_TYPE, DATA_PTR, dont_gc_on, rb_objspace::dont_incremental, finalizer_table, finalizing, RVALUE::flags, rb_objspace::flags, RVALUE::free, GC_ASSERT, gc_enter_event_finalizer, heap_allocated_pages, heap_pages_deferred_final, heap_pages_sorted, force_finalize_list::next, force_finalize_list::obj, RANY, rb_obj_is_fiber(), rb_obj_is_main_ractor(), rb_obj_is_mutex(), rb_obj_is_thread(), RDATA, RUBY_DEFAULT_FREE, st_delete, st_foreach, st_free_table, T_DATA, T_FILE, T_NONE, force_finalize_list::table, and xfree.

## ◆ rb_objspace_free()

void rb_objspace_free | ( | struct rb_objspace * | objspace | ) |

Definition at line 1610 of file gc.c.

References rb_objspace::eden_heap, free, global_list, heap_allocated_pages, heap_eden, heap_pages_himem, heap_pages_lomem, heap_pages_sorted, heap_pages_sorted_length, rb_objspace::id_to_obj_tbl, is_lazy_sweeping, rb_objspace::mark_stack, gc_list::next, rb_objspace::obj_to_id_tbl, rb_objspace::profile, rb_bug(), rb_objspace::records, st_free_table, rb_heap_struct::total_pages, rb_heap_struct::total_slots, and xfree.

Referenced by ruby_vm_destruct().

## ◆ rb_postponed_job_flush()

void rb_postponed_job_flush | ( | rb_vm_t * | vm | ) |

Definition at line 1676 of file vm_trace.c.

References ATOMIC_CAS, rb_postponed_job_struct::data, EC_EXEC_TAG, EC_POP_TAG, EC_PUSH_TAG, rb_execution_context_struct::errinfo, free, rb_postponed_job_struct::func, rb_execution_context_struct::interrupt_mask, rb_workqueue_job::jnode, rb_workqueue_job::job, rb_vm_struct::postponed_job_buffer, rb_vm_struct::postponed_job_index, POSTPONED_JOB_INTERRUPT_MASK, Qnil, rb_nativethread_lock_lock(), rb_nativethread_lock_unlock(), RUBY_VM_SET_POSTPONED_JOB_INTERRUPT, TAG_NONE, TRAP_INTERRUPT_MASK, rb_vm_struct::workqueue, and rb_vm_struct::workqueue_lock.

Referenced by rb_threadptr_execute_interrupts().

## ◆ rb_proc_alloc()

VALUE rb_proc_alloc | ( | VALUE | klass | ) |

Definition at line 145 of file proc.c.

References TypedData_Make_Struct.

## ◆ rb_proc_dup()

VALUE rb_proc_dup | ( | VALUE | self | ) |

Definition at line 956 of file vm.c.

References rb_proc_t::block, FL_SET_RAW, GetProcPtr, rb_proc_t::is_from_method, rb_proc_t::is_lambda, rb_cProc, RB_GC_GUARD, RB_OBJ_SHAREABLE_P, and RUBY_FL_SHAREABLE.

Referenced by Init_Proc(), and rb_proc_isolate().

## ◆ rb_proc_isolate()

VALUE rb_proc_isolate | ( | VALUE | self | ) |

Definition at line 1097 of file vm.c.

References rb_proc_dup(), and rb_proc_isolate_bang().

## ◆ rb_proc_isolate_bang()

VALUE rb_proc_isolate_bang | ( | VALUE | self | ) |

Definition at line 1055 of file vm.c.

References collect_outer_variable_name_data::ary, rb_proc_t::block, block_type_iseq, rb_iseq_struct::body, FL_SET_RAW, rb_proc_t::is_isolated, rb_captured_block::iseq, collect_outer_variable_name_data::isolate, rb_iseq_constant_body::outer_variables, Qfalse, rb_ary_join(), rb_eArgError, rb_eRuntimeError, rb_id_table_foreach(), rb_raise(), rb_str_new2, RTYPEDDATA_DATA, RUBY_FL_SHAREABLE, rb_captured_block::self, str, StringValueCStr, TRUE, rb_block::type, VM_ASSERT, and collect_outer_variable_name_data::yield.

Referenced by rb_proc_isolate().

## ◆ rb_proc_ractor_make_shareable()

VALUE rb_proc_ractor_make_shareable | ( | VALUE | self | ) |

Definition at line 1105 of file vm.c.

References collect_outer_variable_name_data::ary, rb_proc_t::block, block_type_iseq, rb_iseq_struct::body, FL_SET_RAW, rb_proc_t::is_isolated, collect_outer_variable_name_data::isolate, rb_iseq_constant_body::outer_variables, Qfalse, rb_ary_join(), rb_eArgError, rb_eRuntimeError, rb_id_table_foreach(), rb_raise(), rb_str_new2, collect_outer_variable_name_data::read_only, RTYPEDDATA_DATA, RUBY_FL_SHAREABLE, str, StringValueCStr, TRUE, rb_block::type, and collect_outer_variable_name_data::yield.

## ◆ rb_reset_coverages()

void rb_reset_coverages | ( | void |  | ) |

Definition at line 5800 of file thread.c.

References COVERAGE_TARGET_BRANCHES, COVERAGE_TARGET_METHODS, Qfalse, rb_clear_coverages(), rb_iseq_remove_coverage_all(), and rb_remove_event_hook().

## ◆ rb_set_coverages()

void rb_set_coverages | ( | VALUE | coverages,
|  | int | mode,
|  | VALUE | me2counter
| ) |  |

Definition at line 5785 of file thread.c.

References COVERAGE_TARGET_BRANCHES, COVERAGE_TARGET_METHODS, Qnil, rb_add_event_hook2(), RUBY_EVENT_CALL, RUBY_EVENT_COVERAGE_BRANCH, RUBY_EVENT_COVERAGE_LINE, RUBY_EVENT_HOOK_FLAG_RAW_ARG, and RUBY_EVENT_HOOK_FLAG_SAFE.

## ◆ rb_signal_buff_size()

int rb_signal_buff_size | ( | void |  | ) |

Definition at line 747 of file signal.c.

Referenced by rb_thread_check_trap_pending(), and rb_threadptr_check_signal().

## ◆ rb_signal_exec()

int rb_signal_exec | ( | rb_thread_t * | th,
|  | int | sig
| ) |  |

Definition at line 1099 of file signal.c.

References rb_vm_struct::cmd, FALSE, Qundef, rb_interrupt(), rb_threadptr_signal_exit(), rb_threadptr_signal_raise(), SIGINT, and rb_vm_struct::trap_list.

Referenced by rb_threadptr_execute_interrupts().

## ◆ rb_thread_alloc()

VALUE rb_thread_alloc | ( | VALUE | klass | ) |

Definition at line 3114 of file vm.c.

Referenced by rb_thread_create(), and rb_thread_create_ractor().

## ◆ rb_thread_check_trap_pending()

int rb_thread_check_trap_pending | ( | void |  | ) |

Definition at line 1587 of file thread.c.

References rb_signal_buff_size().

## ◆ rb_thread_reset_timer_thread()

void rb_thread_reset_timer_thread | ( | void |  | ) |

Definition at line 4696 of file thread.c.

## ◆ rb_thread_start_timer_thread()

void rb_thread_start_timer_thread | ( | void |  | ) |

Definition at line 4702 of file thread.c.

## ◆ rb_thread_stop_timer_thread()

void rb_thread_stop_timer_thread | ( | void |  | ) |

Definition at line 4688 of file thread.c.

## ◆ rb_thread_wakeup_timer_thread()

void rb_thread_wakeup_timer_thread | ( | int |  | ) |

## ◆ rb_threadptr_check_signal()

void rb_threadptr_check_signal | ( | rb_thread_t * | mth | ) |

Definition at line 4598 of file thread.c.

References rb_signal_buff_size().

Referenced by rb_f_kill().

## ◆ rb_threadptr_execute_interrupts()

int rb_threadptr_execute_interrupts | ( | rb_thread_t * | th,
|  | int | blocking_timing
| ) |  |

Definition at line 2424 of file thread.c.

Referenced by rb_thread_execute_interrupts().

## ◆ rb_threadptr_interrupt()

void rb_threadptr_interrupt | ( | rb_thread_t * | th | ) |

Definition at line 508 of file thread.c.

Referenced by rb_notify_fd_close(), rb_ractor_terminate_interrupt_main_thread(), and rb_thread_kill().

## ◆ rb_threadptr_pending_interrupt_clear()

void rb_threadptr_pending_interrupt_clear | ( | rb_thread_t * | th | ) |

Definition at line 1981 of file thread.c.

References rb_thread_struct::pending_interrupt_queue, and rb_ary_clear().

## ◆ rb_threadptr_pending_interrupt_enque()

void rb_threadptr_pending_interrupt_enque | ( | rb_thread_t * | th,
|  | VALUE | v
| ) |  |

Definition at line 1987 of file thread.c.

References rb_thread_struct::pending_interrupt_queue, rb_thread_struct::pending_interrupt_queue_checked, and rb_ary_push().

Referenced by rb_fiber_start(), rb_notify_fd_close(), and rb_thread_kill().

## ◆ rb_threadptr_signal_exit()

void rb_threadptr_signal_exit | ( | rb_thread_t * | th | ) |

Definition at line 2575 of file thread.c.

References argv, rb_vm_struct::main_thread, rb_vm_struct::ractor, rb_eSystemExit, rb_str_new2, and rb_thread_struct::vm.

Referenced by rb_signal_exec().

## ◆ rb_threadptr_signal_raise()

void rb_threadptr_signal_raise | ( | rb_thread_t * | th,
|  | int | sig
| ) |  |

Definition at line 2565 of file thread.c.

References argv, INT2FIX, rb_vm_struct::main_thread, rb_vm_struct::ractor, rb_eSignal, and rb_thread_struct::vm.

Referenced by rb_signal_exec().

## ◆ rb_threadptr_unlock_all_locking_mutexes()

void rb_threadptr_unlock_all_locking_mutexes | ( | rb_thread_t * | th | ) |

Definition at line 567 of file thread.c.

References rb_mutex_struct::fiber, rb_thread_struct::keeping_mutexes, rb_mutex_struct::next_mutex, and rb_bug().

Referenced by rb_thread_terminate_all().

## ◆ rb_vm_bh_to_procval()

VALUE rb_vm_bh_to_procval | ( | const rb_execution_context_t * | ec,
|  | VALUE | block_handler
| ) |  |

Definition at line 474 of file vm_insnhelper.c.

References 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_bh_to_procval(), VM_BLOCK_HANDLER_NONE, and VM_UNREACHABLE.

Referenced by rb_vm_bh_to_procval().

## ◆ rb_vm_block_copy()

void rb_vm_block_copy | ( | VALUE | obj,
|  | const struct rb_block * | dst,
|  | const struct rb_block * | src
| ) |  |

Definition at line 921 of file vm.c.

References rb_block::as, block_type_ifunc, block_type_iseq, block_type_proc, block_type_symbol, rb_block::captured, rb_captured_block::code, rb_captured_block::ep, rb_block::proc, RB_OBJ_WRITE, rb_vm_block_ep_update(), rb_captured_block::self, rb_block::symbol, and rb_captured_block::val.

## ◆ rb_vm_block_ep_update()

void rb_vm_block_ep_update | ( | VALUE | obj,
|  | const struct rb_block * | dst,
|  | const VALUE * | ep
| ) |  |

Definition at line 326 of file vm.c.

References rb_block::as, rb_block::captured, rb_captured_block::ep, Qundef, and RB_OBJ_WRITTEN.

Referenced by rb_vm_block_copy().

## ◆ rb_vm_bugreport()

void rb_vm_bugreport | ( | const void * | ctx | ) |

Definition at line 962 of file vm_dump.c.

References CLASS_OF, count, feof, getenv, len, LIMITED_NAME_LENGTH, rb_vm_struct::loaded_features, map(), name, NULL, PATH_MAX, procstat_vm(), rb_vm_struct::progname, RARRAY_AREF, RARRAY_LEN, rb_backtrace_print_as_bugreport(), rb_class_real(), rb_dump_machine_register, rb_obj_class(), rb_print_backtrace(), rb_search_class_path(), RSTRING_PTR, SDR, snprintf, T_CLASS, T_MODULE, and T_STRING.

Referenced by rb_assert_failure().

## ◆ rb_vm_call_kw()

VALUE rb_vm_call_kw | ( | rb_execution_context_t * | ec,
|  | VALUE | recv,
|  | VALUE | id,
|  | int | argc,
|  | const VALUE * | argv,
|  | const rb_callable_method_entry_t * | me,
|  | int | kw_splat
| ) |  |

Definition at line 260 of file vm_eval.c.

References argc, argv, and rb_vm_call0().

Referenced by rb_check_funcall_with_hook_kw().

## ◆ rb_vm_check_ints_blocking()

int rb_vm_check_ints_blocking | ( | rb_execution_context_t * | ec | ) |

Definition at line 222 of file thread.c.

## ◆ rb_vm_cond_timedwait()

void rb_vm_cond_timedwait | ( | rb_vm_t * | vm,
|  | rb_nativethread_cond_t * | cond,
|  | unsigned long | msec
| ) |  |

Definition at line 211 of file vm_sync.c.

Referenced by rb_ractor_terminate_all().

## ◆ rb_vm_cond_wait()

void rb_vm_cond_wait | ( | rb_vm_t * | vm,
|  | rb_nativethread_cond_t * | cond
| ) |  |

Definition at line 205 of file vm_sync.c.

Referenced by rb_vm_barrier().

## ◆ rb_vm_control_frame_id_and_class()

int rb_vm_control_frame_id_and_class | ( | const rb_control_frame_t * | cfp,
|  | ID * | idp,
|  | ID * | called_idp,
|  | VALUE * | klassp
| ) |  |

Definition at line 2424 of file vm.c.

References rb_callable_method_entry_struct::called_id, rb_callable_method_entry_struct::def, FALSE, rb_method_definition_struct::original_id, rb_callable_method_entry_struct::owner, rb_vm_frame_method_entry(), and TRUE.

Referenced by rb_ec_frame_method_id_and_class().

## ◆ rb_vm_encoded_insn_data_table_init()

void rb_vm_encoded_insn_data_table_init | ( | void |  | ) |

Definition at line 3139 of file iseq.c.

References insn_data_struct::insn, INSN_CODE, insn_data_struct::insn_len, int(), insn_data_struct::notrace_encoded_insn, rb_vm_get_insns_address_table(), st_add_direct, st_init_numtable_with_size, and insn_data_struct::trace_encoded_insn.

Referenced by ruby_setup().

## ◆ rb_vm_env_local_variables()

VALUE rb_vm_env_local_variables | ( | const rb_env_t * | env | ) |

Definition at line 876 of file vm.c.

References env.

## ◆ rb_vm_env_prev_env()

const rb_env_t * rb_vm_env_prev_env | ( | const rb_env_t * | env | ) |

Definition at line 830 of file vm.c.

References env, and NULL.

Referenced by rb_vmdebug_env_dump_raw().

## ◆ rb_vm_ep_local_ep()

const VALUE * rb_vm_ep_local_ep | ( | const VALUE * | ep | ) |

Definition at line 93 of file vm.c.

Referenced by rb_vm_proc_local_ep().

## ◆ rb_vm_frame_block_handler()

VALUE rb_vm_frame_block_handler | ( | const rb_control_frame_t * | cfp | ) |

Definition at line 126 of file vm.c.

Referenced by rb_block_arity(), rb_block_given_p(), rb_block_min_max_arity(), and rb_block_pair_yield_optimizable().

## ◆ rb_vm_frame_method_entry()

const rb_callable_method_entry_t * rb_vm_frame_method_entry | ( | const rb_control_frame_t * | cfp | ) |

Definition at line 667 of file vm_insnhelper.c.

References rb_control_frame_struct::ep, FALSE, NULL, TRUE, and VM_ENV_DATA_INDEX_ME_CREF.

Referenced by rb_profile_frames(), rb_raise_jump(), rb_vm_control_frame_id_and_class(), and rb_vm_pop_cfunc_frame().

## ◆ rb_vm_get_binding_creatable_next_cfp()

rb_control_frame_t * rb_vm_get_binding_creatable_next_cfp | ( | const rb_execution_context_t * | ec,
|  | const rb_control_frame_t * | cfp
| ) |  |

Definition at line 577 of file vm.c.

References rb_control_frame_struct::iseq, and RUBY_VM_PREVIOUS_CONTROL_FRAME.

Referenced by rb_tracearg_binding(), rb_vm_make_binding(), and rb_vm_stack_to_heap().

## ◆ rb_vm_get_ruby_level_next_cfp()

rb_control_frame_t * rb_vm_get_ruby_level_next_cfp | ( | const rb_execution_context_t * | ec,
|  | const rb_control_frame_t * | cfp
| ) |  |

Definition at line 589 of file vm.c.

References RUBY_VM_PREVIOUS_CONTROL_FRAME.

Referenced by rb_method_definition_set(), rb_source_location(), rb_sourcefile(), rb_sourceline(), rb_tracearg_parameters(), rb_vm_cbase(), rb_vm_cref_in_context(), rb_vm_cref_replace_with_duplicated_cref(), and rb_vm_make_binding().

## ◆ rb_vm_get_sourceline()

int rb_vm_get_sourceline | ( | const rb_control_frame_t * | cfp | ) |

Definition at line 71 of file vm_backtrace.c.

References FIX2INT, rb_control_frame_struct::iseq, rb_control_frame_struct::pc, and rb_iseq_first_lineno().

Referenced by rb_method_definition_set(), rb_source_location(), rb_sourceline(), and rb_vm_make_binding().

## ◆ rb_vm_inc_const_missing_count()

void rb_vm_inc_const_missing_count | ( | void |  | ) |

Definition at line 425 of file vm.c.

## ◆ rb_vm_invoke_proc()

VALUE rb_vm_invoke_proc | ( | rb_execution_context_t * | ec,
|  | rb_proc_t * | proc,
|  | int | argc,
|  | const VALUE * | argv,
|  | int | kw_splat,
|  | VALUE | block_handler
| ) |  |

Definition at line 1475 of file vm.c.

References argc, argv, NULL, rb_block::proc, and rb_vm_invoke_bmethod().

Referenced by rb_fiber_start(), rb_proc_call(), rb_proc_call_kw(), rb_proc_call_with_block(), and rb_proc_call_with_block_kw().

## ◆ rb_vm_main_ractor_ec()

rb_execution_context_t * rb_vm_main_ractor_ec | ( | rb_vm_t * | vm | ) |

Definition at line 1978 of file ractor.c.

References rb_vm_struct::main_ractor, rb_vm_struct::ractor, rb_ractor_struct::running_ec, and rb_ractor_struct::threads.

Referenced by rb_workqueue_register().

## ◆ rb_vm_make_binding()

VALUE rb_vm_make_binding | ( | const rb_execution_context_t * | ec,
|  | const rb_control_frame_t * | src_cfp
| ) |  |

Definition at line 1172 of file vm.c.

References rb_block::as, rb_binding_t::block, rb_iseq_struct::body, rb_block::captured, rb_captured_block::code, rb_binding_t::first_lineno, GetBindingPtr, rb_captured_block::iseq, rb_control_frame_struct::iseq, rb_iseq_constant_body::location, rb_iseq_location_struct::pathobj, rb_binding_t::pathobj, rb_binding_alloc(), rb_cBinding, rb_eRuntimeError, RB_OBJ_WRITE, rb_raise(), rb_vm_get_binding_creatable_next_cfp(), rb_vm_get_ruby_level_next_cfp(), rb_vm_get_sourceline(), RUBY_VM_PREVIOUS_CONTROL_FRAME, rb_captured_block::self, and rb_control_frame_struct::self.

Referenced by rb_binding_new(), and rb_tracearg_binding().

## ◆ rb_vm_make_proc_lambda()

VALUE rb_vm_make_proc_lambda | ( | const rb_execution_context_t * | ec,
|  | const struct rb_captured_block * | captured,
|  | VALUE | klass,
|  | int8_t | is_lambda
| ) |  |

Definition at line 1152 of file vm.c.

References block_type_ifunc, block_type_iseq, rb_captured_block::code, rb_captured_block::ep, FALSE, imemo_ifunc, imemo_iseq, rb_captured_block::val, and VM_ASSERT.

## ◆ rb_vm_pop_frame()

void rb_vm_pop_frame | ( | rb_execution_context_t * | ec | ) |

Definition at line 419 of file vm_insnhelper.c.

References rb_execution_context_struct::cfp, and rb_control_frame_struct::ep.

Referenced by rb_binding_add_dynavars(), rb_exec_event_hooks(), rb_raise_jump(), rb_vm_call_cfunc(), and rb_vm_rewind_cfp().

## ◆ rb_vm_proc_local_ep()

const VALUE * rb_vm_proc_local_ep | ( | VALUE | proc | ) |

Definition at line 675 of file thread.c.

References NULL, and rb_vm_ep_local_ep().

Referenced by rb_fiber_start().

## ◆ rb_vm_register_special_exception_str()

void rb_vm_register_special_exception_str | ( | enum ruby_special_exceptions | sp,
|  | VALUE | exception_class,
|  | VALUE | mesg
| ) |  |

Definition at line 2612 of file vm.c.

References OBJ_FREEZE, rb_exc_new3, rb_gc_register_mark_object(), rb_obj_freeze(), and rb_vm_struct::special_exceptions.

## ◆ rb_vm_rewind_cfp()

void rb_vm_rewind_cfp | ( | rb_execution_context_t * | ec,
|  | rb_control_frame_t * | cfp
| ) |  |

Definition at line 639 of file vm.c.

References rb_execution_context_struct::cfp, rb_vm_pop_cfunc_frame(), rb_vm_pop_frame(), and VM_FRAME_MAGIC_CFUNC.

Referenced by rb_protect(), and rb_vrescue2().

## ◆ rb_vm_rewrite_cref()

void rb_vm_rewrite_cref | ( | rb_cref_t * | node,
|  | VALUE | old_klass,
|  | VALUE | new_klass,
|  | rb_cref_t ** | new_cref_ptr
| ) |  |

Definition at line 867 of file vm_insnhelper.c.

References FALSE, METHOD_VISI_UNDEF, rb_cref_struct::next, and NULL.

## ◆ rb_vm_stack_to_heap()

void rb_vm_stack_to_heap | ( | rb_execution_context_t * | ec | ) |

Definition at line 820 of file vm.c.

References rb_execution_context_struct::cfp, rb_vm_get_binding_creatable_next_cfp(), and RUBY_VM_PREVIOUS_CONTROL_FRAME.

Referenced by rb_debug_inspector_open().

## ◆ rb_vm_trap_exit()

void rb_vm_trap_exit | ( | rb_vm_t * | vm | ) |

Definition at line 1077 of file signal.c.

References rb_vm_struct::cmd, and rb_vm_struct::trap_list.

## ◆ rb_vmdebug_debug_print_post()

void rb_vmdebug_debug_print_post | ( | const rb_execution_context_t * | ec,
|  | const rb_control_frame_t * | cfp
| ) |  |

Definition at line 417 of file vm_dump.c.

References rb_execution_context_struct::cfp, rb_inspect(), rb_vmdebug_debug_print_register(), SDR2, and StringValueCStr.

## ◆ rb_vmdebug_debug_print_pre()

void rb_vmdebug_debug_print_pre | ( | const rb_execution_context_t * | ec,
|  | const rb_control_frame_t * | cfp,
|  | const VALUE * | _pc
| ) |  |

Definition at line 388 of file vm_dump.c.

References rb_iseq_struct::body, int(), rb_control_frame_struct::iseq, rb_iseq_constant_body::iseq_encoded, rb_iseq_disasm_insn(), rb_iseq_original_iseq(), rb_vmdebug_debug_print_register(), rb_control_frame_struct::sp, VM_CFP_CNT, and rb_execution_context_struct::vm_stack.

## ◆ rb_vmdebug_stack_dump_raw()

void rb_vmdebug_stack_dump_raw | ( | const rb_execution_context_t * | ec,
|  | const rb_control_frame_t * | cfp
| ) |  |

Definition at line 195 of file vm_dump.c.

References rb_control_frame_struct::ep, GC_GUARDED_PTR_REF, PRIxVALUE, rb_control_frame_struct::sp, t, rb_execution_context_struct::vm_stack, and rb_execution_context_struct::vm_stack_size.

Referenced by rb_vmdebug_stack_dump_all_threads(), rb_vmdebug_stack_dump_raw_current(), and rb_vmdebug_stack_dump_th().

## ◆ ruby_thread_init_stack()

void ruby_thread_init_stack | ( | rb_thread_t * | th | ) |

Definition at line 669 of file thread.c.

Referenced by Init_BareVM().

## ◆ STATIC_ASSERT() [1/2]

STATIC_ASSERT | ( | rb_vm_tag_buf_end |  | ) |

## ◆ STATIC_ASSERT() [2/2]

STATIC_ASSERT | ( | rb_vm_tag_buf_offset | ,
|  | offsetof(struct rb_vm_tag, buf) | ,
|  | 0 |
| ) |  |

## Variable Documentation

## ◆ rb_block_param_proxy

VALUE rb_block_param_proxy
| extern

Definition at line 376 of file vm.c.

Referenced by Init_VM().

## ◆ rb_cISeq

VALUE rb_cISeq
| extern

Definition at line 46 of file iseq.c.

Referenced by Init_ISeq(), rb_insn_operand_intern(), and rb_iseq_load_iseq().

## ◆ rb_cRubyVM

VALUE rb_cRubyVM
| extern

Definition at line 373 of file vm.c.

Referenced by Init_ast(), Init_builtin(), Init_ISeq(), and Init_VM().

## ◆ rb_eRactorIsolationError

VALUE rb_eRactorIsolationError
| extern

Definition at line 23 of file ractor.c.

Referenced by Init_Ractor(), rb_alias_variable(), rb_const_set(), rb_f_global_variables(), and rb_ractor_ensure_shareable().

## ◆ rb_eRactorUnsafeError

VALUE rb_eRactorUnsafeError
| extern

Definition at line 22 of file ractor.c.

Referenced by Init_Ractor().

## ◆ rb_mRubyVMFrozenCore

VALUE rb_mRubyVMFrozenCore
| extern

Definition at line 375 of file vm.c.

Referenced by Init_VM().

## ◆ ruby_binding_data_type

const rb_data_type_t ruby_binding_data_type
| extern

Definition at line 319 of file proc.c.

Referenced by rb_binding_alloc().

## ◆ ruby_threadptr_data_type

const rb_data_type_t ruby_threadptr_data_type
| extern

Definition at line 2991 of file vm.c.