Ruby  2.7.1p83(2020-03-31revisiona0c7c23c9cec0d0ffcba012279cd652d28ad5bf3)
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
vm_core.h File Reference
#include "ruby_assert.h"
#include "ruby/ruby.h"
#include "ruby/st.h"
#include "node.h"
#include "vm_opts.h"
#include "id.h"
#include "method.h"
#include "ruby_atomic.h"
#include "ccan/list/list.h"
#include "ruby/thread_native.h"
#include <setjmp.h>
#include <signal.h>
#include <varargs.h>

Go to the source code of this file.

Data Structures

struct  iseq_inline_cache_entry
 
struct  iseq_inline_iv_cache_entry
 
union  iseq_inline_storage_entry
 
struct  rb_call_info_kw_arg
 
struct  rb_call_info_with_kwarg
 
struct  rb_calling_info
 
struct  rb_kwarg_call_data
 
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_thread_list_struct
 
struct  rb_ensure_entry
 
struct  rb_ensure_list
 
struct  rb_execution_context_struct
 
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
 

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 va_init_list(a, b)   va_start((a))
 
#define RB_ALTSTACK_INIT(var)
 
#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 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 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 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 VM_CALL_ARGS_SPLAT   (0x01 << VM_CALL_ARGS_SPLAT_bit)
 
#define VM_CALL_ARGS_BLOCKARG   (0x01 << VM_CALL_ARGS_BLOCKARG_bit)
 
#define VM_CALL_FCALL   (0x01 << VM_CALL_FCALL_bit)
 
#define VM_CALL_VCALL   (0x01 << VM_CALL_VCALL_bit)
 
#define VM_CALL_ARGS_SIMPLE   (0x01 << VM_CALL_ARGS_SIMPLE_bit)
 
#define VM_CALL_BLOCKISEQ   (0x01 << VM_CALL_BLOCKISEQ_bit)
 
#define VM_CALL_KWARG   (0x01 << VM_CALL_KWARG_bit)
 
#define VM_CALL_KW_SPLAT   (0x01 << VM_CALL_KW_SPLAT_bit)
 
#define VM_CALL_TAILCALL   (0x01 << VM_CALL_TAILCALL_bit)
 
#define VM_CALL_SUPER   (0x01 << VM_CALL_SUPER_bit)
 
#define VM_CALL_ZSUPER   (0x01 << VM_CALL_ZSUPER_bit)
 
#define VM_CALL_OPT_SEND   (0x01 << VM_CALL_OPT_SEND_bit)
 
#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 RUBY_CONST_ASSERT(expr)   (1/!!(expr)) /* expr must be a compile-time constant */
 
#define VM_STACK_OVERFLOWED_P(cfp, sp, margin)
 
#define WHEN_VM_STACK_OVERFLOWED(cfp, sp, margin)   if (LIKELY(!VM_STACK_OVERFLOWED_P(cfp, sp, margin))) {(void)0;} else /* overflowed */
 
#define CHECK_VM_STACK_OVERFLOW0(cfp, sp, margin)   WHEN_VM_STACK_OVERFLOWED(cfp, sp, margin) vm_stackoverflow()
 
#define CHECK_VM_STACK_OVERFLOW(cfp, margin)   WHEN_VM_STACK_OVERFLOWED(cfp, (cfp)->sp, margin) vm_stackoverflow()
 
#define GET_VM()   rb_current_vm()
 
#define GET_THREAD()   rb_current_thread()
 
#define GET_EC()   rb_current_execution_context()
 
#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_INTERRUPTED(ec)
 
#define RUBY_VM_INTERRUPTED_ANY(ec)   ((ec)->interrupt_flag & ~(ec)->interrupt_mask)
 
#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_vm_global_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_vm_global_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 VALUE(* vm_call_handler) (struct rb_execution_context_struct *ec, struct rb_control_frame_struct *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
 
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_functionRB_BUILTIN
 
typedef struct rb_vm_struct rb_vm_t
 
typedef struct rb_control_frame_struct rb_control_frame_t
 
typedef voidrb_jmpbuf_t[5]
 
typedef struct rb_thread_list_struct rb_thread_list_t
 
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_thread_struct rb_thread_t
 
typedef struct iseq_inline_cache_entryIC
 
typedef struct iseq_inline_iv_cache_entryIVC
 
typedef union iseq_inline_storage_entryISE
 
typedef struct rb_call_infoCALL_INFO
 
typedef struct rb_call_cacheCALL_CACHE
 
typedef struct rb_call_dataCALL_DATA
 
typedef VALUE CDHASH
 
typedef rb_control_frame_t *FUNC_FASTCALL rb_insn_func_t(rb_execution_context_t *, rb_control_frame_t *)
 
typedef RETSIGTYPE(* 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, 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, 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, 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_, 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,
  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,
  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,
  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,
  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, VM_CHECKMATCH_TYPE_WHEN = 1,
  VM_CHECKMATCH_TYPE_CASE = 2, VM_CHECKMATCH_TYPE_RESCUE = 3
}
 
enum  vm_call_flag_bits {
  VM_CALL_ARGS_SPLAT_bit, VM_CALL_ARGS_BLOCKARG_bit, VM_CALL_FCALL_bit, VM_CALL_VCALL_bit,
  VM_CALL_ARGS_SIMPLE_bit, VM_CALL_BLOCKISEQ_bit, VM_CALL_KWARG_bit, VM_CALL_KW_SPLAT_bit,
  VM_CALL_TAILCALL_bit, VM_CALL_SUPER_bit, VM_CALL_ZSUPER_bit, VM_CALL_OPT_SEND_bit,
  VM_CALL__END, VM_CALL_ARGS_SPLAT_bit, VM_CALL_ARGS_BLOCKARG_bit, VM_CALL_FCALL_bit,
  VM_CALL_VCALL_bit, VM_CALL_ARGS_SIMPLE_bit, VM_CALL_BLOCKISEQ_bit, VM_CALL_KWARG_bit,
  VM_CALL_KW_SPLAT_bit, VM_CALL_TAILCALL_bit, VM_CALL_SUPER_bit, VM_CALL_ZSUPER_bit,
  VM_CALL_OPT_SEND_bit, VM_CALL__END
}
 
enum  vm_special_object_type {
  VM_SPECIAL_OBJECT_VMCORE = 1, VM_SPECIAL_OBJECT_CBASE, VM_SPECIAL_OBJECT_CONST_BASE, 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,
  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_PASSED = 0x0010, 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_CFRAME_EMPTY_KW = 0x0800, VM_ENV_FLAG_LOCAL = 0x0002, VM_ENV_FLAG_ESCAPED = 0x0004,
  VM_ENV_FLAG_WB_REQUIRED = 0x0008
}
 
enum  { TIMER_INTERRUPT_MASK = 0x01, PENDING_INTERRUPT_MASK = 0x02, POSTPONED_JOB_INTERRUPT_MASK = 0x04, TRAP_INTERRUPT_MASK = 0x08 }
 

Functions

void rb_vm_encoded_insn_data_table_init (void)
 
struct rb_objspacerb_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)
 
RUBY_SYMBOL_EXPORT_BEGIN rb_iseq_trb_iseq_new (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, enum iseq_type)
 
rb_iseq_trb_iseq_new_top (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent)
 
rb_iseq_trb_iseq_new_main (const rb_ast_body_t *ast, VALUE path, VALUE realpath, const rb_iseq_t *parent)
 
rb_iseq_trb_iseq_new_with_opt (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno, const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t *)
 
rb_iseq_trb_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)
 
const VALUErb_vm_ep_local_ep (const VALUE *ep)
 
const VALUErb_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 *)
 
 NORETURN (void rb_bug_for_fatal_signal(ruby_sighandler_t default_sighandler, int sig, const void *, const char *fmt,...))
 
RUBY_SYMBOL_EXPORT_BEGIN 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)
 
RUBY_SYMBOL_EXPORT_END 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_trb_vm_env_prev_env (const rb_env_t *env)
 
const VALUErb_binding_add_dynavars (VALUE bindval, rb_binding_t *bind, int dyncount, const ID *dynvars)
 
void rb_vm_inc_const_missing_count (void)
 
void rb_vm_gvl_destroy (rb_vm_t *vm)
 
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)
 
MJIT_STATIC void rb_vm_pop_frame (rb_execution_context_t *ec)
 
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_trb_vm_get_ruby_level_next_cfp (const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
 
rb_control_frame_trb_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)
 
MJIT_STATIC 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 MJIT_STATIC rb_callable_method_entry_trb_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)
 
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)
 
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)
 
RUBY_SYMBOL_EXPORT_BEGIN 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
 
RUBY_EXTERN VALUE rb_cISeq
 
RUBY_EXTERN VALUE rb_cRubyVM
 
RUBY_EXTERN VALUE rb_mRubyVMFrozenCore
 
RUBY_EXTERN VALUE rb_block_param_proxy
 
const rb_data_type_t ruby_binding_data_type
 
RUBY_SYMBOL_EXPORT_BEGIN RUBY_EXTERN rb_vm_truby_current_vm_ptr
 
RUBY_EXTERN rb_execution_context_truby_current_execution_context_ptr
 
RUBY_EXTERN rb_event_flag_t ruby_vm_event_flags
 
RUBY_EXTERN rb_event_flag_t ruby_vm_event_enabled_global_flags
 
RUBY_EXTERN unsigned int ruby_vm_event_local_num
 

Macro Definition Documentation

◆ ARRAY_REDEFINED_OP_FLAG

#define ARRAY_REDEFINED_OP_FLAG   (1 << 3)

Definition at line 706 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 717 of file vm_core.h.

◆ CHECK_VM_STACK_OVERFLOW

#define CHECK_VM_STACK_OVERFLOW (   cfp,
  margin 
)    WHEN_VM_STACK_OVERFLOWED(cfp, (cfp)->sp, margin) vm_stackoverflow()

Definition at line 1746 of file vm_core.h.

◆ CHECK_VM_STACK_OVERFLOW0

#define CHECK_VM_STACK_OVERFLOW0 (   cfp,
  sp,
  margin 
)    WHEN_VM_STACK_OVERFLOWED(cfp, sp, margin) vm_stackoverflow()

Definition at line 1744 of file vm_core.h.

◆ CoreDataFromValue

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

Definition at line 266 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_vm_global_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 0)

Definition at line 1935 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_vm_global_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 1)

Definition at line 1938 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)

Definition at line 1898 of file vm_core.h.

◆ FALSE_REDEFINED_OP_FLAG

#define FALSE_REDEFINED_OP_FLAG   (1 << 11)

Definition at line 714 of file vm_core.h.

◆ FLOAT_REDEFINED_OP_FLAG

#define FLOAT_REDEFINED_OP_FLAG   (1 << 1)

Definition at line 704 of file vm_core.h.

◆ FUNC_FASTCALL

#define FUNC_FASTCALL (   x)    x

Definition at line 1139 of file vm_core.h.

◆ GC_GUARDED_PTR

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

Definition at line 1148 of file vm_core.h.

◆ GC_GUARDED_PTR_P

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

Definition at line 1150 of file vm_core.h.

◆ GC_GUARDED_PTR_REF

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

Definition at line 1149 of file vm_core.h.

◆ GET_EC

#define GET_EC ( )    rb_current_execution_context()

Definition at line 1766 of file vm_core.h.

◆ GET_THREAD

#define GET_THREAD ( )    rb_current_thread()

Definition at line 1765 of file vm_core.h.

◆ GET_VM

#define GET_VM ( )    rb_current_vm()

Definition at line 1764 of file vm_core.h.

◆ GetBindingPtr

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

Definition at line 1065 of file vm_core.h.

◆ GetCoreDataFromValue

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

Definition at line 270 of file vm_core.h.

◆ GetProcPtr

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

Definition at line 1046 of file vm_core.h.

◆ GetVMPtr

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

Definition at line 549 of file vm_core.h.

◆ HASH_REDEFINED_OP_FLAG

#define HASH_REDEFINED_OP_FLAG   (1 << 4)

Definition at line 707 of file vm_core.h.

◆ INTEGER_REDEFINED_OP_FLAG

#define INTEGER_REDEFINED_OP_FLAG   (1 << 0)

Definition at line 703 of file vm_core.h.

◆ N_OR_RUBY_DEBUG

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

Definition at line 22 of file vm_core.h.

◆ NIL_REDEFINED_OP_FLAG

#define NIL_REDEFINED_OP_FLAG   (1 << 9)

Definition at line 712 of file vm_core.h.

◆ NSIG

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

Definition at line 103 of file vm_core.h.

◆ PATHOBJ_PATH

#define PATHOBJ_PATH   0

Definition at line 281 of file vm_core.h.

◆ PATHOBJ_REALPATH

#define PATHOBJ_REALPATH   1

Definition at line 282 of file vm_core.h.

◆ PROC_REDEFINED_OP_FLAG

#define PROC_REDEFINED_OP_FLAG   (1 << 12)

Definition at line 715 of file vm_core.h.

◆ RB_ALTSTACK

#define RB_ALTSTACK (   var)    (0)

Definition at line 143 of file vm_core.h.

◆ RB_ALTSTACK_FREE

#define RB_ALTSTACK_FREE (   var)

Definition at line 142 of file vm_core.h.

◆ RB_ALTSTACK_INIT

#define RB_ALTSTACK_INIT (   var)

Definition at line 141 of file vm_core.h.

◆ rb_vm_register_special_exception

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

Definition at line 1726 of file vm_core.h.

◆ REGEXP_REDEFINED_OP_FLAG

#define REGEXP_REDEFINED_OP_FLAG   (1 << 8)

Definition at line 711 of file vm_core.h.

◆ RUBY_CONST_ASSERT

#define RUBY_CONST_ASSERT (   expr)    (1/!!(expr)) /* expr must be a compile-time constant */

Definition at line 1737 of file vm_core.h.

◆ RUBY_EVENT_COVERAGE_BRANCH

#define RUBY_EVENT_COVERAGE_BRANCH   0x020000

Definition at line 1957 of file vm_core.h.

◆ RUBY_EVENT_COVERAGE_LINE

#define RUBY_EVENT_COVERAGE_LINE   0x010000

Definition at line 1956 of file vm_core.h.

◆ RUBY_NSIG

#define RUBY_NSIG   NSIG

Definition at line 106 of file vm_core.h.

◆ RUBY_SIGCHLD

#define RUBY_SIGCHLD   (0)

Definition at line 113 of file vm_core.h.

◆ RUBY_VM_CHECK_INTS

#define RUBY_VM_CHECK_INTS (   ec)    rb_vm_check_ints(ec)

Definition at line 1862 of file vm_core.h.

◆ RUBY_VM_FIBER_MACHINE_STACK_SIZE

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

Definition at line 683 of file vm_core.h.

◆ RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN

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

Definition at line 687 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 681 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 682 of file vm_core.h.

◆ RUBY_VM_INTERRUPTED

#define RUBY_VM_INTERRUPTED (   ec)
Value:
((ec)->interrupt_flag & ~(ec)->interrupt_mask & \

Definition at line 1840 of file vm_core.h.

◆ RUBY_VM_INTERRUPTED_ANY

#define RUBY_VM_INTERRUPTED_ANY (   ec)    ((ec)->interrupt_flag & ~(ec)->interrupt_mask)

Definition at line 1842 of file vm_core.h.

◆ RUBY_VM_NEXT_CONTROL_FRAME

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

Definition at line 1385 of file vm_core.h.

◆ RUBY_VM_PREVIOUS_CONTROL_FRAME

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

Definition at line 1384 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 1837 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 1838 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 1836 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 1839 of file vm_core.h.

◆ RUBY_VM_SIZE_ALIGN

#define RUBY_VM_SIZE_ALIGN   4096

Definition at line 674 of file vm_core.h.

◆ RUBY_VM_THREAD_MACHINE_STACK_SIZE

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

Definition at line 678 of file vm_core.h.

◆ RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN

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

Definition at line 679 of file vm_core.h.

◆ RUBY_VM_THREAD_MODEL

#define RUBY_VM_THREAD_MODEL   2

Definition at line 60 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 676 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 677 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 1387 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 1287 of file vm_core.h.

◆ SDR

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

Definition at line 1639 of file vm_core.h.

◆ SDR2

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

Definition at line 1640 of file vm_core.h.

◆ SIGCHLD_LOSSY

#define SIGCHLD_LOSSY   (0)

Definition at line 120 of file vm_core.h.

◆ STRING_REDEFINED_OP_FLAG

#define STRING_REDEFINED_OP_FLAG   (1 << 2)

Definition at line 705 of file vm_core.h.

◆ SYMBOL_REDEFINED_OP_FLAG

#define SYMBOL_REDEFINED_OP_FLAG   (1 << 6)

Definition at line 709 of file vm_core.h.

◆ sysstack_error

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

Definition at line 1735 of file vm_core.h.

◆ TAG_BREAK

#define TAG_BREAK   RUBY_TAG_BREAK

Definition at line 199 of file vm_core.h.

◆ TAG_FATAL

#define TAG_FATAL   RUBY_TAG_FATAL

Definition at line 205 of file vm_core.h.

◆ TAG_MASK

#define TAG_MASK   RUBY_TAG_MASK

Definition at line 206 of file vm_core.h.

◆ TAG_NEXT

#define TAG_NEXT   RUBY_TAG_NEXT

Definition at line 200 of file vm_core.h.

◆ TAG_NONE

#define TAG_NONE   RUBY_TAG_NONE

Definition at line 197 of file vm_core.h.

◆ TAG_RAISE

#define TAG_RAISE   RUBY_TAG_RAISE

Definition at line 203 of file vm_core.h.

◆ TAG_REDO

#define TAG_REDO   RUBY_TAG_REDO

Definition at line 202 of file vm_core.h.

◆ TAG_RETRY

#define TAG_RETRY   RUBY_TAG_RETRY

Definition at line 201 of file vm_core.h.

◆ TAG_RETURN

#define TAG_RETURN   RUBY_TAG_RETURN

Definition at line 198 of file vm_core.h.

◆ TAG_THROW

#define TAG_THROW   RUBY_TAG_THROW

Definition at line 204 of file vm_core.h.

◆ TIME_REDEFINED_OP_FLAG

#define TIME_REDEFINED_OP_FLAG   (1 << 7)

Definition at line 710 of file vm_core.h.

◆ TRUE_REDEFINED_OP_FLAG

#define TRUE_REDEFINED_OP_FLAG   (1 << 10)

Definition at line 713 of file vm_core.h.

◆ USE_LAZY_LOAD

#define USE_LAZY_LOAD   0

Definition at line 478 of file vm_core.h.

◆ va_init_list

#define va_init_list (   a,
 
)    va_start((a))

Definition at line 131 of file vm_core.h.

◆ VM_ASSERT

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

Definition at line 56 of file vm_core.h.

◆ VM_BLOCK_HANDLER_NONE

#define VM_BLOCK_HANDLER_NONE   0

Definition at line 1291 of file vm_core.h.

◆ VM_CALL_ARGS_BLOCKARG

#define VM_CALL_ARGS_BLOCKARG   (0x01 << VM_CALL_ARGS_BLOCKARG_bit)

Definition at line 1102 of file vm_core.h.

◆ VM_CALL_ARGS_SIMPLE

#define VM_CALL_ARGS_SIMPLE   (0x01 << VM_CALL_ARGS_SIMPLE_bit)

Definition at line 1105 of file vm_core.h.

◆ VM_CALL_ARGS_SPLAT

#define VM_CALL_ARGS_SPLAT   (0x01 << VM_CALL_ARGS_SPLAT_bit)

Definition at line 1101 of file vm_core.h.

◆ VM_CALL_BLOCKISEQ

#define VM_CALL_BLOCKISEQ   (0x01 << VM_CALL_BLOCKISEQ_bit)

Definition at line 1106 of file vm_core.h.

◆ VM_CALL_FCALL

#define VM_CALL_FCALL   (0x01 << VM_CALL_FCALL_bit)

Definition at line 1103 of file vm_core.h.

◆ VM_CALL_KW_SPLAT

#define VM_CALL_KW_SPLAT   (0x01 << VM_CALL_KW_SPLAT_bit)

Definition at line 1108 of file vm_core.h.

◆ VM_CALL_KWARG

#define VM_CALL_KWARG   (0x01 << VM_CALL_KWARG_bit)

Definition at line 1107 of file vm_core.h.

◆ VM_CALL_OPT_SEND

#define VM_CALL_OPT_SEND   (0x01 << VM_CALL_OPT_SEND_bit)

Definition at line 1112 of file vm_core.h.

◆ VM_CALL_SUPER

#define VM_CALL_SUPER   (0x01 << VM_CALL_SUPER_bit)

Definition at line 1110 of file vm_core.h.

◆ VM_CALL_TAILCALL

#define VM_CALL_TAILCALL   (0x01 << VM_CALL_TAILCALL_bit)

Definition at line 1109 of file vm_core.h.

◆ VM_CALL_VCALL

#define VM_CALL_VCALL   (0x01 << VM_CALL_VCALL_bit)

Definition at line 1104 of file vm_core.h.

◆ VM_CALL_ZSUPER

#define VM_CALL_ZSUPER   (0x01 << VM_CALL_ZSUPER_bit)

Definition at line 1111 of file vm_core.h.

◆ VM_CHECK_MODE

#define VM_CHECK_MODE   N_OR_RUBY_DEBUG(0)

Definition at line 24 of file vm_core.h.

◆ VM_CHECKMATCH_ARRAY

#define VM_CHECKMATCH_ARRAY   0x04

Definition at line 1083 of file vm_core.h.

◆ VM_CHECKMATCH_TYPE_MASK

#define VM_CHECKMATCH_TYPE_MASK   0x03

Definition at line 1082 of file vm_core.h.

◆ VM_CORE_H_EC_DEFINED

#define VM_CORE_H_EC_DEFINED   1

Definition at line 895 of file vm_core.h.

◆ VM_DEBUG_BP_CHECK

#define VM_DEBUG_BP_CHECK   0

Definition at line 720 of file vm_core.h.

◆ VM_DEBUG_VERIFY_METHOD_CACHE

#define VM_DEBUG_VERIFY_METHOD_CACHE   (VMDEBUG != 0)

Definition at line 724 of file vm_core.h.

◆ VM_DEFINECLASS_FLAG_HAS_SUPERCLASS

#define VM_DEFINECLASS_FLAG_HAS_SUPERCLASS   0x10

Definition at line 1003 of file vm_core.h.

◆ VM_DEFINECLASS_FLAG_SCOPED

#define VM_DEFINECLASS_FLAG_SCOPED   0x08

Definition at line 1002 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 1005 of file vm_core.h.

◆ VM_DEFINECLASS_SCOPED_P

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

Definition at line 1004 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 1001 of file vm_core.h.

◆ VM_ENV_DATA_INDEX_ENV

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

Definition at line 1196 of file vm_core.h.

◆ VM_ENV_DATA_INDEX_FLAGS

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

Definition at line 1195 of file vm_core.h.

◆ VM_ENV_DATA_INDEX_ME_CREF

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

Definition at line 1193 of file vm_core.h.

◆ VM_ENV_DATA_INDEX_SPECVAL

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

Definition at line 1194 of file vm_core.h.

◆ VM_ENV_DATA_SIZE

#define VM_ENV_DATA_SIZE   ( 3)

Definition at line 1191 of file vm_core.h.

◆ VM_ENV_INDEX_LAST_LVAR

#define VM_ENV_INDEX_LAST_LVAR   (-VM_ENV_DATA_SIZE)

Definition at line 1198 of file vm_core.h.

◆ VM_GUARDED_PREV_EP

#define VM_GUARDED_PREV_EP (   ep)    GC_GUARDED_PTR(ep)

Definition at line 1290 of file vm_core.h.

◆ VM_INSN_INFO_TABLE_IMPL

#define VM_INSN_INFO_TABLE_IMPL   2

Definition at line 69 of file vm_core.h.

◆ VM_STACK_OVERFLOWED_P

#define VM_STACK_OVERFLOWED_P (   cfp,
  sp,
  margin 
)
Value:
(!RUBY_CONST_ASSERT(sizeof(*(sp)) == sizeof(VALUE)) || \
!RUBY_CONST_ASSERT(sizeof(*(cfp)) == sizeof(rb_control_frame_t)) || \
((rb_control_frame_t *)((sp) + (margin)) + 1) >= (cfp))

Definition at line 1738 of file vm_core.h.

◆ VM_TAGGED_PTR_REF

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

Definition at line 1146 of file vm_core.h.

◆ VM_TAGGED_PTR_SET

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

Definition at line 1145 of file vm_core.h.

◆ VM_UNREACHABLE

#define VM_UNREACHABLE (   func)    UNREACHABLE

Definition at line 57 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 41 of file vm_core.h.

◆ WAITPID_USE_SIGCHLD

#define WAITPID_USE_SIGCHLD   (RUBY_SIGCHLD || SIGCHLD_LOSSY)

Definition at line 124 of file vm_core.h.

◆ WHEN_VM_STACK_OVERFLOWED

#define WHEN_VM_STACK_OVERFLOWED (   cfp,
  sp,
  margin 
)    if (LIKELY(!VM_STACK_OVERFLOWED_P(cfp, sp, margin))) {(void)0;} else /* overflowed */

Definition at line 1742 of file vm_core.h.

Typedef Documentation

◆ CALL_CACHE

typedef struct rb_call_cache* CALL_CACHE

Definition at line 1133 of file vm_core.h.

◆ CALL_DATA

typedef struct rb_call_data* CALL_DATA

Definition at line 1134 of file vm_core.h.

◆ CALL_INFO

typedef struct rb_call_info* CALL_INFO

Definition at line 1132 of file vm_core.h.

◆ CDHASH

typedef VALUE CDHASH

Definition at line 1136 of file vm_core.h.

◆ IC

typedef struct iseq_inline_cache_entry* IC

Definition at line 1129 of file vm_core.h.

◆ ISE

Definition at line 1131 of file vm_core.h.

◆ IVC

Definition at line 1130 of file vm_core.h.

◆ rb_at_exit_list

◆ rb_backtrace_iter_func

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

Definition at line 1714 of file vm_core.h.

◆ RB_BUILTIN

Definition at line 574 of file vm_core.h.

◆ rb_compile_option_t

Definition at line 218 of file vm_core.h.

◆ rb_control_frame_t

◆ rb_ensure_entry_t

◆ rb_ensure_list_t

◆ rb_execution_context_t

◆ rb_fiber_t

typedef struct rb_fiber_struct rb_fiber_t

Definition at line 841 of file vm_core.h.

◆ rb_hook_list_t

◆ rb_insn_func_t

Definition at line 1143 of file vm_core.h.

◆ rb_iseq_location_t

◆ rb_jmpbuf_t

typedef void* rb_jmpbuf_t[5]

Definition at line 792 of file vm_core.h.

◆ rb_num_t

Definition at line 181 of file vm_core.h.

◆ rb_snum_t

Definition at line 182 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 839 of file vm_core.h.

◆ rb_thread_list_t

◆ 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 553 of file vm_core.h.

◆ rb_vm_t

typedef struct rb_vm_struct rb_vm_t

◆ ruby_sighandler_t

typedef RETSIGTYPE(* ruby_sighandler_t) (int)

Definition at line 1642 of file vm_core.h.

◆ vm_call_handler

typedef VALUE(* vm_call_handler) (struct rb_execution_context_struct *ec, struct rb_control_frame_struct *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)

Definition at line 263 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_PASSED 
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_CFRAME_EMPTY_KW 
VM_ENV_FLAG_LOCAL 
VM_ENV_FLAG_ESCAPED 
VM_ENV_FLAG_WB_REQUIRED 

Definition at line 1152 of file vm_core.h.

◆ anonymous enum

anonymous enum
Enumerator
TIMER_INTERRUPT_MASK 
PENDING_INTERRUPT_MASK 
POSTPONED_JOB_INTERRUPT_MASK 
TRAP_INTERRUPT_MASK 

Definition at line 1829 of file vm_core.h.

◆ rb_block_handler_type

Enumerator
block_handler_type_iseq 
block_handler_type_ifunc 
block_handler_type_symbol 
block_handler_type_proc 
block_handler_type_iseq 
block_handler_type_ifunc 
block_handler_type_symbol 
block_handler_type_proc 

Definition at line 737 of file vm_core.h.

◆ rb_block_type

Enumerator
block_type_iseq 
block_type_ifunc 
block_type_symbol 
block_type_proc 
block_type_iseq 
block_type_ifunc 
block_type_symbol 
block_type_proc 

Definition at line 744 of file vm_core.h.

◆ rb_thread_status

Enumerator
THREAD_RUNNABLE 
THREAD_STOPPED 
THREAD_STOPPED_FOREVER 
THREAD_KILLED 
THREAD_RUNNABLE 
THREAD_STOPPED 
THREAD_STOPPED_FOREVER 
THREAD_KILLED 

Definition at line 782 of file vm_core.h.

◆ rb_vm_defineclass_type_t

Enumerator
VM_DEFINECLASS_TYPE_CLASS 
VM_DEFINECLASS_TYPE_SINGLETON_CLASS 
VM_DEFINECLASS_TYPE_MODULE 
VM_DEFINECLASS_TYPE_MASK 
VM_DEFINECLASS_TYPE_CLASS 
VM_DEFINECLASS_TYPE_SINGLETON_CLASS 
VM_DEFINECLASS_TYPE_MODULE 
VM_DEFINECLASS_TYPE_MASK 

Definition at line 993 of file vm_core.h.

◆ 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_ 
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 515 of file vm_core.h.

◆ ruby_special_exceptions

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

Definition at line 506 of file vm_core.h.

◆ 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 
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 184 of file vm_core.h.

◆ ruby_vm_throw_flags

Enumerator
VM_THROW_NO_ESCAPE_FLAG 
VM_THROW_STATE_MASK 
VM_THROW_NO_ESCAPE_FLAG 
VM_THROW_STATE_MASK 

Definition at line 208 of file vm_core.h.

◆ vm_call_flag_bits

Enumerator
VM_CALL_ARGS_SPLAT_bit 
VM_CALL_ARGS_BLOCKARG_bit 
VM_CALL_FCALL_bit 
VM_CALL_VCALL_bit 
VM_CALL_ARGS_SIMPLE_bit 
VM_CALL_BLOCKISEQ_bit 
VM_CALL_KWARG_bit 
VM_CALL_KW_SPLAT_bit 
VM_CALL_TAILCALL_bit 
VM_CALL_SUPER_bit 
VM_CALL_ZSUPER_bit 
VM_CALL_OPT_SEND_bit 
VM_CALL__END 
VM_CALL_ARGS_SPLAT_bit 
VM_CALL_ARGS_BLOCKARG_bit 
VM_CALL_FCALL_bit 
VM_CALL_VCALL_bit 
VM_CALL_ARGS_SIMPLE_bit 
VM_CALL_BLOCKISEQ_bit 
VM_CALL_KWARG_bit 
VM_CALL_KW_SPLAT_bit 
VM_CALL_TAILCALL_bit 
VM_CALL_SUPER_bit 
VM_CALL_ZSUPER_bit 
VM_CALL_OPT_SEND_bit 
VM_CALL__END 

Definition at line 1085 of file vm_core.h.

◆ vm_check_match_type

Enumerator
VM_CHECKMATCH_TYPE_WHEN 
VM_CHECKMATCH_TYPE_CASE 
VM_CHECKMATCH_TYPE_RESCUE 
VM_CHECKMATCH_TYPE_WHEN 
VM_CHECKMATCH_TYPE_CASE 
VM_CHECKMATCH_TYPE_RESCUE 

Definition at line 1076 of file vm_core.h.

◆ vm_special_object_type

Enumerator
VM_SPECIAL_OBJECT_VMCORE 
VM_SPECIAL_OBJECT_CBASE 
VM_SPECIAL_OBJECT_CONST_BASE 
VM_SPECIAL_OBJECT_VMCORE 
VM_SPECIAL_OBJECT_CBASE 
VM_SPECIAL_OBJECT_CONST_BASE 

Definition at line 1114 of file vm_core.h.

◆ vm_svar_index

Enumerator
VM_SVAR_LASTLINE 
VM_SVAR_BACKREF 
VM_SVAR_EXTRA_START 
VM_SVAR_FLIPFLOP_START 
VM_SVAR_LASTLINE 
VM_SVAR_BACKREF 
VM_SVAR_EXTRA_START 
VM_SVAR_FLIPFLOP_START 

Definition at line 1120 of file vm_core.h.

Function Documentation

◆ Init_native_thread()

void Init_native_thread ( rb_thread_t th)

◆ NORETURN()

NORETURN ( void   rb_bug_for_fatal_signalruby_sighandler_t default_sighandler, int sig, const void *, const char *fmt,...)

◆ rb_binding_add_dynavars()

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

Definition at line 984 of file vm.c.

◆ rb_binding_alloc()

VALUE rb_binding_alloc ( VALUE  klass)

Definition at line 331 of file proc.c.

◆ rb_catch_protect()

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

Definition at line 2326 of file vm_eval.c.

◆ rb_clear_coverages()

void rb_clear_coverages ( void  )

Definition at line 4468 of file thread.c.

◆ rb_ec_clear_vm_stack()

void rb_ec_clear_vm_stack ( rb_execution_context_t ec)

Definition at line 2699 of file vm.c.

◆ rb_ec_error_print()

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

Definition at line 346 of file eval_error.c.

◆ 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 2200 of file vm.c.

◆ rb_ec_get_errinfo()

VALUE rb_ec_get_errinfo ( const rb_execution_context_t ec)

Definition at line 1852 of file eval.c.

◆ rb_ec_initialize_vm_stack()

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

Definition at line 2683 of file vm.c.

◆ 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 2676 of file vm.c.

◆ rb_ec_setup_exception()

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

Definition at line 639 of file eval.c.

◆ 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 362 of file vm_trace.c.

◆ rb_execution_context_mark()

void rb_execution_context_mark ( const rb_execution_context_t ec)

Definition at line 2500 of file vm.c.

◆ rb_execution_context_update()

void rb_execution_context_update ( const rb_execution_context_t ec)

Definition at line 2472 of file vm.c.

◆ rb_fiber_close()

void rb_fiber_close ( rb_fiber_t fib)

Definition at line 2072 of file cont.c.

◆ rb_gc_mark_machine_stack()

void rb_gc_mark_machine_stack ( const rb_execution_context_t ec)

Definition at line 4983 of file gc.c.

◆ rb_get_coverages()

VALUE rb_get_coverages ( void  )

Definition at line 5477 of file thread.c.

◆ 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 1252 of file vm_trace.c.

◆ rb_hook_list_free()

void rb_hook_list_free ( rb_hook_list_t hooks)

Definition at line 66 of file vm_trace.c.

◆ rb_hook_list_mark()

void rb_hook_list_mark ( rb_hook_list_t hooks)

Definition at line 53 of file vm_trace.c.

Referenced by rb_vm_mark().

◆ rb_hook_list_remove_tracepoint()

void rb_hook_list_remove_tracepoint ( rb_hook_list_t list,
VALUE  tpval 
)

Definition at line 1262 of file vm_trace.c.

◆ rb_iseq_coverage()

VALUE rb_iseq_coverage ( const rb_iseq_t iseq)

Definition at line 1086 of file iseq.c.

◆ rb_iseq_disasm()

VALUE rb_iseq_disasm ( const rb_iseq_t iseq)

Definition at line 2278 of file iseq.c.

◆ 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 2021 of file iseq.c.

◆ rb_iseq_eval()

RUBY_SYMBOL_EXPORT_BEGIN VALUE rb_iseq_eval ( const rb_iseq_t iseq)

Definition at line 2163 of file vm.c.

◆ rb_iseq_eval_main()

VALUE rb_iseq_eval_main ( const rb_iseq_t iseq)

Definition at line 2173 of file vm.c.

◆ rb_iseq_new()

RUBY_SYMBOL_EXPORT_BEGIN 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 761 of file iseq.c.

◆ 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 785 of file iseq.c.

◆ 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 769 of file iseq.c.

◆ 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  
)

Definition at line 828 of file iseq.c.

◆ 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,
enum  iseq_type,
const rb_compile_option_t  
)

Definition at line 807 of file iseq.c.

◆ rb_iseq_path()

VALUE rb_iseq_path ( const rb_iseq_t iseq)

Definition at line 1027 of file iseq.c.

◆ rb_iseq_pathobj_new()

RUBY_SYMBOL_EXPORT_END VALUE rb_iseq_pathobj_new ( VALUE  path,
VALUE  realpath 
)

Definition at line 450 of file iseq.c.

◆ rb_iseq_pathobj_set()

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

Definition at line 469 of file iseq.c.

◆ rb_iseq_realpath()

VALUE rb_iseq_realpath ( const rb_iseq_t iseq)

Definition at line 1033 of file iseq.c.

◆ rb_objspace_alloc()

struct rb_objspace* rb_objspace_alloc ( void  )

Definition at line 1587 of file gc.c.

◆ rb_objspace_call_finalizer()

void rb_objspace_call_finalizer ( struct rb_objspace )

Definition at line 3443 of file gc.c.

◆ rb_objspace_free()

void rb_objspace_free ( struct rb_objspace )

Definition at line 1602 of file gc.c.

◆ rb_postponed_job_flush()

void rb_postponed_job_flush ( rb_vm_t vm)

Definition at line 1662 of file vm_trace.c.

◆ rb_proc_alloc()

VALUE rb_proc_alloc ( VALUE  klass)

Definition at line 145 of file proc.c.

◆ rb_proc_dup()

VALUE rb_proc_dup ( VALUE  self)

Definition at line 920 of file vm.c.

◆ rb_reset_coverages()

void rb_reset_coverages ( void  )

Definition at line 5504 of file thread.c.

◆ rb_set_coverages()

void rb_set_coverages ( VALUE  ,
int  ,
VALUE   
)

Definition at line 5489 of file thread.c.

◆ rb_signal_buff_size()

int rb_signal_buff_size ( void  )

Definition at line 726 of file signal.c.

◆ rb_signal_exec()

int rb_signal_exec ( rb_thread_t th,
int  sig 
)

Definition at line 1082 of file signal.c.

◆ rb_thread_alloc()

VALUE rb_thread_alloc ( VALUE  klass)

Definition at line 2756 of file vm.c.

◆ rb_thread_check_trap_pending()

RUBY_SYMBOL_EXPORT_BEGIN int rb_thread_check_trap_pending ( void  )

Definition at line 1372 of file thread.c.

◆ rb_thread_reset_timer_thread()

void rb_thread_reset_timer_thread ( void  )

Definition at line 4425 of file thread.c.

◆ rb_thread_start_timer_thread()

void rb_thread_start_timer_thread ( void  )

Definition at line 4431 of file thread.c.

◆ rb_thread_stop_timer_thread()

void rb_thread_stop_timer_thread ( void  )

Definition at line 4417 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 4318 of file thread.c.

◆ rb_threadptr_execute_interrupts()

int rb_threadptr_execute_interrupts ( rb_thread_t ,
int   
)

Definition at line 2194 of file thread.c.

◆ rb_threadptr_interrupt()

void rb_threadptr_interrupt ( rb_thread_t th)

Definition at line 510 of file thread.c.

◆ rb_threadptr_pending_interrupt_clear()

void rb_threadptr_pending_interrupt_clear ( rb_thread_t th)

Definition at line 1751 of file thread.c.

◆ rb_threadptr_pending_interrupt_enque()

void rb_threadptr_pending_interrupt_enque ( rb_thread_t th,
VALUE  v 
)

Definition at line 1757 of file thread.c.

◆ rb_threadptr_signal_exit()

void rb_threadptr_signal_exit ( rb_thread_t th)

Definition at line 2334 of file thread.c.

◆ rb_threadptr_signal_raise()

void rb_threadptr_signal_raise ( rb_thread_t th,
int  sig 
)

Definition at line 2324 of file thread.c.

◆ rb_threadptr_unlock_all_locking_mutexes()

void rb_threadptr_unlock_all_locking_mutexes ( rb_thread_t th)

Definition at line 542 of file thread.c.

◆ rb_vm_bh_to_procval()

static VALUE rb_vm_bh_to_procval ( const rb_execution_context_t ec,
VALUE  block_handler 
)

Definition at line 12278 of file rb_mjit_min_header-2.7.1.h.

References block_handler, Qnil, and VM_BLOCK_HANDLER_NONE.

◆ rb_vm_block_copy()

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

Definition at line 885 of file vm.c.

◆ rb_vm_block_ep_update()

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

Definition at line 315 of file vm.c.

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

◆ rb_vm_bugreport()

void rb_vm_bugreport ( const void )

Definition at line 918 of file vm_dump.c.

◆ 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 265 of file vm_eval.c.

◆ 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 2184 of file vm.c.

◆ rb_vm_encoded_insn_data_table_init()

void rb_vm_encoded_insn_data_table_init ( void  )

Definition at line 3085 of file iseq.c.

◆ rb_vm_env_local_variables()

VALUE rb_vm_env_local_variables ( const rb_env_t env)

Definition at line 840 of file vm.c.

◆ rb_vm_env_prev_env()

const rb_env_t* rb_vm_env_prev_env ( const rb_env_t env)

Definition at line 796 of file vm.c.

◆ rb_vm_ep_local_ep()

const VALUE* rb_vm_ep_local_ep ( const VALUE ep)

Definition at line 75 of file vm.c.

◆ rb_vm_frame_block_handler()

VALUE rb_vm_frame_block_handler ( const rb_control_frame_t cfp)

Definition at line 115 of file vm.c.

Referenced by rb_block_given_p().

◆ rb_vm_frame_method_entry()

static const rb_callable_method_entry_t * rb_vm_frame_method_entry ( const rb_control_frame_t cfp)

◆ 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 541 of file vm.c.

◆ 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 553 of file vm.c.

◆ rb_vm_get_sourceline()

int rb_vm_get_sourceline ( const rb_control_frame_t )

Definition at line 68 of file vm_backtrace.c.

◆ rb_vm_gvl_destroy()

void rb_vm_gvl_destroy ( rb_vm_t vm)

Definition at line 421 of file thread.c.

◆ rb_vm_inc_const_missing_count()

void rb_vm_inc_const_missing_count ( void  )

Definition at line 386 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 1249 of file vm.c.

◆ 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 953 of file vm.c.

◆ 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 933 of file vm.c.

◆ rb_vm_pop_frame()

static void rb_vm_pop_frame ( rb_execution_context_t ec)

Definition at line 12233 of file rb_mjit_min_header-2.7.1.h.

◆ rb_vm_proc_local_ep()

const VALUE* rb_vm_proc_local_ep ( VALUE  proc)

Definition at line 653 of file thread.c.

◆ 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 2302 of file vm.c.

◆ rb_vm_rewind_cfp()

void rb_vm_rewind_cfp ( rb_execution_context_t ec,
rb_control_frame_t cfp 
)

Definition at line 604 of file vm.c.

◆ 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 12608 of file rb_mjit_min_header-2.7.1.h.

◆ rb_vm_stack_to_heap()

void rb_vm_stack_to_heap ( rb_execution_context_t ec)

Definition at line 786 of file vm.c.

◆ rb_vm_trap_exit()

void rb_vm_trap_exit ( rb_vm_t vm)

Definition at line 1060 of file signal.c.

◆ 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 414 of file vm_dump.c.

◆ 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 385 of file vm_dump.c.

◆ 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 192 of file vm_dump.c.

◆ ruby_thread_init_stack()

void ruby_thread_init_stack ( rb_thread_t th)

Definition at line 647 of file thread.c.

◆ 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 ,
 
)

Variable Documentation

◆ rb_block_param_proxy

RUBY_EXTERN VALUE rb_block_param_proxy

Definition at line 1043 of file vm_core.h.

◆ rb_cISeq

RUBY_EXTERN VALUE rb_cISeq

Definition at line 1040 of file vm_core.h.

◆ rb_cRubyVM

RUBY_EXTERN VALUE rb_cRubyVM

Definition at line 1041 of file vm_core.h.

◆ rb_mRubyVMFrozenCore

RUBY_EXTERN VALUE rb_mRubyVMFrozenCore

Definition at line 1042 of file vm_core.h.

◆ ruby_binding_data_type

const rb_data_type_t ruby_binding_data_type

Definition at line 319 of file proc.c.

◆ ruby_current_execution_context_ptr

RUBY_EXTERN rb_execution_context_t* ruby_current_execution_context_ptr

Definition at line 1757 of file vm_core.h.

◆ ruby_current_vm_ptr

Definition at line 1756 of file vm_core.h.

◆ ruby_threadptr_data_type

const rb_data_type_t ruby_threadptr_data_type

Definition at line 2643 of file vm.c.

◆ ruby_vm_event_enabled_global_flags

RUBY_EXTERN rb_event_flag_t ruby_vm_event_enabled_global_flags

Definition at line 1759 of file vm_core.h.

◆ ruby_vm_event_flags

RUBY_EXTERN rb_event_flag_t ruby_vm_event_flags

Definition at line 1758 of file vm_core.h.

◆ ruby_vm_event_local_num

RUBY_EXTERN unsigned int ruby_vm_event_local_num

Definition at line 1760 of file vm_core.h.

UNLIKELY
#define UNLIKELY(x)
Definition: ffi_common.h:126
RUBY_CONST_ASSERT
#define RUBY_CONST_ASSERT(expr)
Definition: vm_core.h:1737
VALUE
unsigned long VALUE
Definition: ruby.h:102
PENDING_INTERRUPT_MASK
@ PENDING_INTERRUPT_MASK
Definition: vm_core.h:1831
cfp
rb_control_frame_t * cfp
Definition: rb_mjit_min_header-2.7.1.h:14481
rb_control_frame_struct
Definition: vm_core.h:760
rb_event_flag_t
uint32_t rb_event_flag_t
Definition: ruby.h:2278
TRAP_INTERRUPT_MASK
@ TRAP_INTERRUPT_MASK
Definition: vm_core.h:1833