diff options
Diffstat (limited to 'internal/vm.h')
-rw-r--r-- | internal/vm.h | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/internal/vm.h b/internal/vm.h index 8893d70cd4..74635e6ad8 100644 --- a/internal/vm.h +++ b/internal/vm.h @@ -40,28 +40,25 @@ enum method_missing_reason { }; /* vm_insnhelper.h */ -rb_serial_t rb_next_class_serial(void); +VALUE rb_vm_push_frame_fname(struct rb_execution_context_struct *ec, VALUE fname); /* vm.c */ VALUE rb_obj_is_thread(VALUE obj); void rb_vm_mark(void *ptr); +void rb_vm_register_global_object(VALUE obj); void rb_vm_each_stack_value(void *ptr, void (*cb)(VALUE, void*), void *ctx); PUREFUNC(VALUE rb_vm_top_self(void)); -void rb_vm_inc_const_missing_count(void); const void **rb_vm_get_insns_address_table(void); VALUE rb_source_location(int *pline); const char *rb_source_location_cstr(int *pline); -MJIT_STATIC void rb_vm_pop_cfunc_frame(void); -int rb_vm_add_root_module(VALUE module); +void rb_vm_pop_cfunc_frame(void); void rb_vm_check_redefinition_by_prepend(VALUE klass); int rb_vm_check_optimizable_mid(VALUE mid); VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements); -MJIT_STATIC VALUE ruby_vm_special_exception_copy(VALUE); +VALUE ruby_vm_special_exception_copy(VALUE); PUREFUNC(st_table *rb_vm_fstring_table(void)); -MJIT_SYMBOL_EXPORT_BEGIN -VALUE vm_exec(struct rb_execution_context_struct *, bool); /* used in JIT-ed code */ -MJIT_SYMBOL_EXPORT_END +void rb_lastline_set_up(VALUE val, unsigned int up); /* vm_eval.c */ VALUE rb_current_realfilepath(void); @@ -81,23 +78,31 @@ VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv, VALUE data2); void rb_check_stack_overflow(void); +#if USE_YJIT +/* vm_exec.c */ +extern uint64_t rb_vm_insns_count; +#endif + +extern bool rb_free_at_exit; + +/* miniinit.c and builtin.c */ +void rb_free_loaded_builtin_table(void); + /* vm_insnhelper.c */ VALUE rb_equal_opt(VALUE obj1, VALUE obj2); VALUE rb_eql_opt(VALUE obj1, VALUE obj2); struct rb_iseq_struct; -MJIT_SYMBOL_EXPORT_BEGIN const struct rb_callcache *rb_vm_search_method_slowpath(const struct rb_callinfo *ci, VALUE klass); -MJIT_SYMBOL_EXPORT_END /* vm_method.c */ struct rb_execution_context_struct; -MJIT_SYMBOL_EXPORT_BEGIN int rb_ec_obj_respond_to(struct rb_execution_context_struct *ec, VALUE obj, ID id, int priv); -MJIT_SYMBOL_EXPORT_END + +void rb_clear_constant_cache(void); /* vm_dump.c */ -void rb_print_backtrace(void); +void rb_print_backtrace(FILE *); /* vm_backtrace.c */ VALUE rb_vm_thread_backtrace(int argc, const VALUE *argv, VALUE thval); @@ -105,18 +110,18 @@ VALUE rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval) VALUE rb_vm_backtrace(int argc, const VALUE * argv, struct rb_execution_context_struct * ec); VALUE rb_vm_backtrace_locations(int argc, const VALUE * argv, struct rb_execution_context_struct * ec); VALUE rb_make_backtrace(void); -void rb_backtrace_print_as_bugreport(void); +void rb_backtrace_print_as_bugreport(FILE*); int rb_backtrace_p(VALUE obj); VALUE rb_backtrace_to_str_ary(VALUE obj); VALUE rb_backtrace_to_location_ary(VALUE obj); +VALUE rb_location_ary_to_backtrace(VALUE ary); void rb_backtrace_each(VALUE (*iter)(VALUE recv, VALUE str), VALUE output); int rb_frame_info_p(VALUE obj); -void rb_frame_info_get(VALUE obj, VALUE *path, int *node_id); +int rb_get_node_id_from_frame_info(VALUE obj); +const struct rb_iseq_struct *rb_get_iseq_from_frame_info(VALUE obj); -MJIT_SYMBOL_EXPORT_BEGIN VALUE rb_ec_backtrace_object(const struct rb_execution_context_struct *ec); void rb_backtrace_use_iseq_first_lineno_for_last_location(VALUE self); -MJIT_SYMBOL_EXPORT_END #define RUBY_DTRACE_CREATE_HOOK(name, arg) \ RUBY_DTRACE_HOOK(name##_CREATE, arg) |