From a73894337a830cdd32a913964f3150bc35269975 Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 19 Apr 2007 10:37:08 +0000 Subject: * eval.c, node.h, thread.c, yarvcore.[ch], eval_intern.h: support set_trace_func (incomplete. id and klass don't be passed). And support Thread#set_trace_func which hook only specified thread and Thread#add_trace_func which add new trace func instead of replace old one. C level API was modified. See thread.c (logic) and yarvcore.h (data structures). * vm.c, vm_macro.def: add hook points. * compile.c, insns.def: fix "trace" instruction. * iseq.c, vm_macro.h: add compile option "trace_instruction". * test/ruby/test_settracefunc.rb: hook "c-return" of set_trace_func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- insns.def | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'insns.def') diff --git a/insns.def b/insns.def index 582e698d1d..d616508b8c 100644 --- a/insns.def +++ b/insns.def @@ -843,7 +843,6 @@ definemethod get_cref(GET_ISEQ(), GET_LFP())); } - /** @c setting @e make alias (if v_p is Qtrue, make valias) @@ -1020,15 +1019,12 @@ postexe */ DEFINE_INSN trace -(num_t flag, VALUE args) +(num_t nf) () () { - /* TODO: trace instruction design */ - if (th->vm->trace_flag & flag) { - /* */ - args = Qnil; - } + rb_event_flag_t flag = nf; + EXEC_EVENT_HOOK(th, flag, GET_SELF(), 0, 0 /* TODO: id, klass */); } /**********************************************************/ -- cgit v1.2.3