From dfba87cd622f9699f54d1d0b8c057deb428874b6 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Tue, 8 Jun 2021 17:34:08 +0900 Subject: Make it possible to get AST::Node from Thread::Backtrace::Location RubyVM::AST.of(Thread::Backtrace::Location) returns a node that corresponds to the location. Typically, the node is a method call, but not always. This change also includes iseq's dump/load support of node_ids for each instructions. --- internal/vm.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/vm.h') diff --git a/internal/vm.h b/internal/vm.h index 689b4fa61f..8251b09e98 100644 --- a/internal/vm.h +++ b/internal/vm.h @@ -111,6 +111,8 @@ int rb_backtrace_p(VALUE obj); VALUE rb_backtrace_to_str_ary(VALUE obj); VALUE rb_backtrace_to_location_ary(VALUE obj); 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); MJIT_SYMBOL_EXPORT_BEGIN VALUE rb_ec_backtrace_object(const struct rb_execution_context_struct *ec); -- cgit v1.2.3