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
31enum method_missing_reason {
32 MISSING_NOENTRY = 0x00,
33 MISSING_PRIVATE = 0x01,
34 MISSING_PROTECTED = 0x02,
38 MISSING_MISSING = 0x20,
47void rb_vm_mark(
void *ptr);
48void rb_vm_register_global_object(
VALUE obj);
49void rb_vm_each_stack_value(
void *ptr,
void (*cb)(
VALUE,
void*),
void *ctx);
50PUREFUNC(
VALUE rb_vm_top_self(
void));
51const void **rb_vm_get_insns_address_table(
void);
52VALUE rb_source_location(
int *pline);
53const char *rb_source_location_cstr(
int *pline);
54void rb_vm_pop_cfunc_frame(
void);
55void rb_vm_check_redefinition_by_prepend(
VALUE klass);
56int rb_vm_check_optimizable_mid(
VALUE mid);
59PUREFUNC(
st_table *rb_vm_fstring_table(
void));
61void rb_lastline_set_up(
VALUE val,
unsigned int up);
64VALUE rb_current_realfilepath(
void);
67VALUE rb_check_funcall_with_hook_kw(
VALUE recv,
ID mid,
int argc,
const VALUE *argv,
68 rb_check_funcall_hook *hook,
VALUE arg,
int kw_splat);
77void rb_check_stack_overflow(
void);
78#define RB_BLOCK_NO_USE_PACKED_ARGS 2
80struct vm_ifunc *rb_current_ifunc(
void);
84extern uint64_t rb_vm_insns_count;
87extern bool rb_free_at_exit;
90void rb_free_loaded_builtin_table(
void);
102void rb_clear_constant_cache(
void);
105void rb_print_backtrace(
FILE *);
109VALUE rb_vm_thread_backtrace_locations(
int argc,
const VALUE *argv,
VALUE thval);
112VALUE rb_make_backtrace(
void);
113void rb_backtrace_print_as_bugreport(
FILE*);
114int rb_backtrace_p(
VALUE obj);
119int rb_frame_info_p(
VALUE obj);
120int rb_get_node_id_from_frame_info(
VALUE obj);
124void rb_backtrace_use_iseq_first_lineno_for_last_location(
VALUE self);
126#define RUBY_DTRACE_CREATE_HOOK(name, arg) \
127 RUBY_DTRACE_HOOK(name##_CREATE, arg)
128#define RUBY_DTRACE_HOOK(name, arg) \
130 if (UNLIKELY(RUBY_DTRACE_##name##_ENABLED())) { \
132 const char *dtrace_file = rb_source_location_cstr(&dtrace_line); \
133 if (!dtrace_file) dtrace_file = ""; \
134 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.