From 5ac990e83eb4399b38542d788622c8069c7c4192 Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 6 Dec 2018 13:42:32 +0000 Subject: `script_compiled` TracePoint event [Feature #15287] * vm_trace.c: add `script_compiled` event. This event invoked after script compiling and before evaluating compiled script. Also the following methods are added: `TracePoint#compiled_instruction_sequence` method to get compiled `RubyVM::InstructionSequence` instance. `TracePoint#compiled_eval_script` method to get compiled script (String) by *eval methods (return nil if compiling by file). * vm_trace.c (tracepoint_attr_raised_exception): git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/ruby.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/ruby') diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 9e9423e810..e901c290d1 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -2216,6 +2216,7 @@ int ruby_native_thread_p(void); #define RUBY_EVENT_THREAD_BEGIN 0x0400 #define RUBY_EVENT_THREAD_END 0x0800 #define RUBY_EVENT_FIBER_SWITCH 0x1000 +#define RUBY_EVENT_SCRIPT_COMPILED 0x2000 #define RUBY_EVENT_TRACEPOINT_ALL 0xffff /* special events */ -- cgit v1.2.3