* eval_error.c (error_print), vm_eval.c (eval_string_with_cref),

vm_trace.c (rb_suppress_tracing): use TH_PUSH_TAG() instead of
  PUSH_TAG().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2012-10-23 20:42:45 +00:00
parent a0873931ce
commit 378041cfbf
4 changed files with 18 additions and 12 deletions

View File

@ -1,3 +1,9 @@
Wed Oct 24 05:41:18 2012 Koichi Sasada <ko1@atdot.net>
* eval_error.c (error_print), vm_eval.c (eval_string_with_cref),
vm_trace.c (rb_suppress_tracing): use TH_PUSH_TAG() instead of
PUSH_TAG().
Wed Oct 24 05:17:52 2012 Koichi Sasada <ko1@atdot.net> Wed Oct 24 05:17:52 2012 Koichi Sasada <ko1@atdot.net>
* vm_eval.c (vm_call0_body): remove RUBY_VM_CHECK_INTS() * vm_eval.c (vm_call0_body): remove RUBY_VM_CHECK_INTS()

View File

@ -89,14 +89,14 @@ error_print(void)
return; return;
rb_thread_raised_clear(th); rb_thread_raised_clear(th);
PUSH_TAG(); TH_PUSH_TAG(th);
if (EXEC_TAG() == 0) { if (TH_EXEC_TAG() == 0) {
errat = get_backtrace(errinfo); errat = get_backtrace(errinfo);
} }
else { else {
errat = Qnil; errat = Qnil;
} }
if (EXEC_TAG()) if (TH_EXEC_TAG())
goto error; goto error;
if (NIL_P(errat)) { if (NIL_P(errat)) {
const char *file = rb_sourcefile(); const char *file = rb_sourcefile();
@ -122,7 +122,7 @@ error_print(void)
} }
eclass = CLASS_OF(errinfo); eclass = CLASS_OF(errinfo);
if (EXEC_TAG() == 0) { if (TH_EXEC_TAG() == 0) {
e = rb_funcall(errinfo, rb_intern("message"), 0, 0); e = rb_funcall(errinfo, rb_intern("message"), 0, 0);
StringValue(e); StringValue(e);
einfo = RSTRING_PTR(e); einfo = RSTRING_PTR(e);
@ -132,7 +132,7 @@ error_print(void)
einfo = ""; einfo = "";
elen = 0; elen = 0;
} }
if (EXEC_TAG()) if (TH_EXEC_TAG())
goto error; goto error;
if (eclass == rb_eRuntimeError && elen == 0) { if (eclass == rb_eRuntimeError && elen == 0) {
warn_print(": unhandled exception\n"); warn_print(": unhandled exception\n");
@ -192,7 +192,7 @@ error_print(void)
} }
} }
error: error:
POP_TAG(); TH_POP_TAG();
rb_thread_raised_set(th, raised_flag); rb_thread_raised_set(th, raised_flag);
} }

View File

@ -1096,8 +1096,8 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, NODE *cref, const char
parse_in_eval = th->parse_in_eval; parse_in_eval = th->parse_in_eval;
mild_compile_error = th->mild_compile_error; mild_compile_error = th->mild_compile_error;
PUSH_TAG(); TH_PUSH_TAG(th);
if ((state = EXEC_TAG()) == 0) { if ((state = TH_EXEC_TAG()) == 0) {
rb_iseq_t *iseq; rb_iseq_t *iseq;
volatile VALUE iseqval; volatile VALUE iseqval;
@ -1156,7 +1156,7 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, NODE *cref, const char
CHECK_STACK_OVERFLOW(th->cfp, iseq->stack_max); CHECK_STACK_OVERFLOW(th->cfp, iseq->stack_max);
result = vm_exec(th); result = vm_exec(th);
} }
POP_TAG(); TH_POP_TAG();
th->mild_compile_error = mild_compile_error; th->mild_compile_error = mild_compile_error;
th->parse_in_eval = parse_in_eval; th->parse_in_eval = parse_in_eval;

View File

@ -372,11 +372,11 @@ rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg)
outer_state = th->state; outer_state = th->state;
th->state = 0; th->state = 0;
PUSH_TAG(); TH_PUSH_TAG(th);
if ((state = EXEC_TAG()) == 0) { if ((state = TH_EXEC_TAG()) == 0) {
result = (*func)(arg); result = (*func)(arg);
} }
POP_TAG(); TH_POP_TAG();
if (raised) { if (raised) {
rb_threadptr_set_raised(th); rb_threadptr_set_raised(th);