summaryrefslogtreecommitdiffstats
path: root/iseq.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-19 10:37:08 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-19 10:37:08 +0000
commit2fd663d256c75bf34e46df0013022fe0a0d01a88 (patch)
tree9867f12c88a52c9c4d7ca5fe30c9b57e5a9e411f /iseq.c
parent325e2525e0b45711e51edc5ae17049f383b6c976 (diff)
downloadruby-2fd663d256c75bf34e46df0013022fe0a0d01a88.tar.gz
ruby-2fd663d256c75bf34e46df0013022fe0a0d01a88.tar.xz
ruby-2fd663d256c75bf34e46df0013022fe0a0d01a88.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@12195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/iseq.c b/iseq.c
index 4a2bed7c5..8071a5763 100644
--- a/iseq.c
+++ b/iseq.c
@@ -200,6 +200,7 @@ static rb_compile_option_t COMPILE_OPTION_DEFAULT = {
OPT_OPERANDS_UNIFICATION, /* int operands_unification; */
OPT_INSTRUCTIONS_UNIFICATION, /* int instructions_unification; */
OPT_STACK_CACHING, /* int stack_caching; */
+ OPT_TRACE_INSTRUCTION,
};
static const rb_compile_option_t COMPILE_OPTION_FALSE;
@@ -227,6 +228,7 @@ make_compile_option(rb_compile_option_t *option, VALUE opt)
SET_COMPILE_OPTION(option, opt, operands_unification);
SET_COMPILE_OPTION(option, opt, instructions_unification);
SET_COMPILE_OPTION(option, opt, stack_caching);
+ SET_COMPILE_OPTION(option, opt, trace_instruction);
#undef SET_COMPILE_OPTION
}
else {