summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-06 13:42:32 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-06 13:42:32 +0000
commit5ac990e83eb4399b38542d788622c8069c7c4192 (patch)
tree3eaf556c26f92948bd2e1bd0c55ff3ef08b2010d /vm_eval.c
parent586e018c739d50be00bb7d750907d53009a0229b (diff)
`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
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vm_eval.c b/vm_eval.c
index 9e1563dd8d..a8764e2fa4 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -1293,6 +1293,8 @@ eval_make_iseq(VALUE src, VALUE fname, int line, const rb_binding_t *bind,
printf("%s\n", StringValuePtr(disasm));
}
+ EXEC_EVENT_HOOK(GET_EC(), RUBY_EVENT_SCRIPT_COMPILED, GET_EC()->cfp->self, 0, 0, 0,
+ rb_ary_new_from_args(2, src, (VALUE)iseq));
return iseq;
}