mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c: remove ENABLE_TRACE/DISABLE_TRACE to trace child nodes of c-call.
[ruby-dev:18699]; nahi commits this as proxy for nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a61871bea2
commit
ba565bd6b3
2 changed files with 5 additions and 14 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Nov 9 11:39:45 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* eval.c: remove ENABLE_TRACE/DISABLE_TRACE to trace child nodes of
|
||||
c-call. [ruby-dev:18699]
|
||||
|
||||
Thu Nov 7 09:51:37 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* eval.c (rb_yield_0): should enable trace for non-cfunc nodes.
|
||||
|
|
14
eval.c
14
eval.c
|
@ -893,8 +893,6 @@ static void assign _((VALUE,NODE*,VALUE,int));
|
|||
static VALUE trace_func = 0;
|
||||
static int tracing = 0;
|
||||
static void call_trace_func _((char*,NODE*,VALUE,ID,VALUE));
|
||||
#define ENABLE_TRACE() (tracing &= ~2)
|
||||
#define DISABLE_TRACE() (tracing |= 2)
|
||||
|
||||
#define SET_CURRENT_SOURCE() (ruby_sourcefile = ruby_current_node->nd_file, \
|
||||
ruby_sourceline = nd_line(ruby_current_node))
|
||||
|
@ -3794,7 +3792,6 @@ rb_yield_0(val, self, klass, pcall)
|
|||
int pcall;
|
||||
{
|
||||
NODE *node;
|
||||
volatile int old_tracing = tracing;
|
||||
volatile VALUE result = Qnil;
|
||||
volatile VALUE old_cref;
|
||||
volatile VALUE old_wrapper;
|
||||
|
@ -3877,7 +3874,6 @@ rb_yield_0(val, self, klass, pcall)
|
|||
result = (*node->nd_cfnc)(val, node->nd_tval, self);
|
||||
}
|
||||
else {
|
||||
ENABLE_TRACE();
|
||||
result = rb_eval(self, node);
|
||||
}
|
||||
}
|
||||
|
@ -3903,7 +3899,6 @@ rb_yield_0(val, self, klass, pcall)
|
|||
}
|
||||
POP_TAG();
|
||||
POP_ITER();
|
||||
tracing = old_tracing;
|
||||
pop_state:
|
||||
POP_CLASS();
|
||||
if (ruby_dyna_vars && (block->flags & BLOCK_D_SCOPE) &&
|
||||
|
@ -4576,16 +4571,13 @@ rb_call0(klass, recv, id, oid, argc, argv, body, nosuper)
|
|||
}
|
||||
if (trace_func) {
|
||||
int state;
|
||||
volatile int old_tracing = tracing;
|
||||
|
||||
call_trace_func("c-call", ruby_current_node, recv, id, klass);
|
||||
DISABLE_TRACE();
|
||||
PUSH_TAG(PROT_FUNC);
|
||||
if ((state = EXEC_TAG()) == 0) {
|
||||
result = call_cfunc(body->nd_cfnc, recv, len, argc, argv);
|
||||
}
|
||||
POP_TAG();
|
||||
tracing = old_tracing;
|
||||
ruby_current_node = ruby_frame->node;
|
||||
call_trace_func("c-return", ruby_current_node, recv, id, klass);
|
||||
if (state) JUMP_TAG(state);
|
||||
|
@ -5048,7 +5040,6 @@ eval(self, src, scope, file, line)
|
|||
struct FRAME frame;
|
||||
NODE *nodesave = ruby_current_node;
|
||||
volatile int iter = ruby_frame->iter;
|
||||
volatile int old_tracing = tracing;
|
||||
int state;
|
||||
|
||||
if (!NIL_P(scope)) {
|
||||
|
@ -5111,7 +5102,6 @@ eval(self, src, scope, file, line)
|
|||
compile_error(0);
|
||||
}
|
||||
if (!NIL_P(result)) ruby_errinfo = result;
|
||||
ENABLE_TRACE();
|
||||
result = eval_node(self, node);
|
||||
}
|
||||
POP_TAG();
|
||||
|
@ -5153,7 +5143,6 @@ eval(self, src, scope, file, line)
|
|||
}
|
||||
ruby_current_node = nodesave;
|
||||
ruby_set_current_source();
|
||||
tracing = old_tracing;
|
||||
if (state) {
|
||||
if (state == TAG_RAISE) {
|
||||
VALUE err;
|
||||
|
@ -5387,7 +5376,6 @@ rb_load(fname, wrap)
|
|||
volatile ID last_func;
|
||||
volatile VALUE wrapper = 0;
|
||||
volatile VALUE self = ruby_top_self;
|
||||
volatile int old_tracing = tracing;
|
||||
NODE *saved_cref = ruby_cref;
|
||||
TMP_PROTECT;
|
||||
|
||||
|
@ -5442,7 +5430,6 @@ rb_load(fname, wrap)
|
|||
node = ruby_eval_tree;
|
||||
ALLOW_INTS;
|
||||
if (ruby_nerrs == 0) {
|
||||
ENABLE_TRACE();
|
||||
eval_node(self, node);
|
||||
}
|
||||
}
|
||||
|
@ -5459,7 +5446,6 @@ rb_load(fname, wrap)
|
|||
POP_CLASS();
|
||||
POP_VARS();
|
||||
ruby_wrapper = wrapper;
|
||||
tracing = old_tracing;
|
||||
if (ruby_nerrs > 0) {
|
||||
ruby_nerrs = 0;
|
||||
rb_exc_raise(ruby_errinfo);
|
||||
|
|
Loading…
Reference in a new issue