12#include "internal/serial.h"
13#include "internal/static_assert.h"
21#ifdef rb_method_basic_definition_p
22# undef rb_method_basic_definition_p
32enum method_missing_reason {
33 MISSING_NOENTRY = 0x00,
34 MISSING_PRIVATE = 0x01,
35 MISSING_PROTECTED = 0x02,
39 MISSING_MISSING = 0x20,
48void rb_vm_mark(
void *ptr);
49void rb_vm_register_global_object(
VALUE obj);
50void rb_vm_each_stack_value(
void *ptr,
void (*cb)(
VALUE,
void*),
void *ctx);
51PUREFUNC(
VALUE rb_vm_top_self(
void));
52const void **rb_vm_get_insns_address_table(
void);
53VALUE rb_source_location(
int *pline);
54const char *rb_source_location_cstr(
int *pline);
55void rb_vm_pop_cfunc_frame(
void);
56void rb_vm_check_redefinition_by_prepend(
VALUE klass);
57int rb_vm_check_optimizable_mid(
VALUE mid);
62void rb_lastline_set_up(
VALUE val,
unsigned int up);
65VALUE rb_current_realfilepath(
void);
68VALUE rb_check_funcall_with_hook_kw(
VALUE recv,
ID mid,
int argc,
const VALUE *argv,
69 rb_check_funcall_hook *hook,
VALUE arg,
int kw_splat);
79void rb_check_stack_overflow(
void);
80#define RB_BLOCK_NO_USE_PACKED_ARGS 2
82struct vm_ifunc *rb_current_ifunc(
void);
83VALUE rb_gccct_clear_table(
void);
85VALUE rb_eval_cmd_call_kw(
VALUE cmd,
int argc,
const VALUE *argv,
int kw_splat);
87#if USE_YJIT || USE_ZJIT
89extern uint64_t rb_vm_insn_count;
92extern bool rb_free_at_exit;
95void rb_free_loaded_builtin_table(
void);
108void rb_print_backtrace(
FILE *);
112VALUE rb_vm_thread_backtrace_locations(
int argc,
const VALUE *argv,
VALUE thval);
115VALUE rb_make_backtrace(
void);
116void rb_backtrace_print_as_bugreport(
FILE*);
117int rb_backtrace_p(
VALUE obj);
119void *rb_backtrace_blob_dump(
VALUE btobj,
int *size_out);
120VALUE rb_backtrace_blob_load(
const void *blob,
int size);
121void rb_backtrace_blob_mark(
const void *blob,
int size);
126int rb_frame_info_p(
VALUE obj);
127int rb_get_node_id_from_frame_info(
VALUE obj);
132#define RUBY_DTRACE_CREATE_HOOK(name, arg) \
133 RUBY_DTRACE_HOOK(name##_CREATE, arg)
134#define RUBY_DTRACE_HOOK(name, arg) \
136 if (UNLIKELY(RUBY_DTRACE_##name##_ENABLED())) { \
138 const char *dtrace_file = rb_source_location_cstr(&dtrace_line); \
139 if (!dtrace_file) dtrace_file = ""; \
140 RUBY_DTRACE_##name(arg, dtrace_file, dtrace_line); \
rb_block_call_func * rb_block_call_func_t
Shorthand type that represents an iterator-written-in-C function pointer.
VALUE type(ANYARGS)
ANYARGS-ed function type.
IFUNC (Internal FUNCtion)
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
uintptr_t VALUE
Type that represents a Ruby object.
ruby_value_type
C-level type of an object.