summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-11 12:49:27 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-11 12:49:27 +0000
commitce179b3d04e0875d7cb332f5b57c9df89bb4de07 (patch)
tree697f3a45265e184f5e9affabf530656b52b2b5c9 /vm_eval.c
parentac28b985bdc2f85eada8070d40f6de9f11dab7f8 (diff)
* vm_insnhelper.h: use T_IMEMO to create THROW_DATA.
Add THROW_DATA_NEW(). * internal.h: move defnition of `struct THROW_DATA' from vm_insnhelper.h to internal.h. Rename `THROW_DATA' to `vm_throw_data'. * eval_intern.h (THROW_DATA_P): move to internal.h. THROW_DATA is no longer T_NODE, so check T_IMEMO. * gc.c (gc_mark_children): mark THROW_DATA. * vm.c: catch up these changes. * vm_eval.c: ditto. * vm_insnhelper.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vm_eval.c b/vm_eval.c
index 294c90e..8ae7045 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -1132,7 +1132,7 @@ rb_iterate(VALUE (* it_proc) (VALUE), VALUE data1,
retval = (*it_proc) (data1);
}
else {
- const struct THROW_DATA *err = (struct THROW_DATA *)th->errinfo;
+ const struct vm_throw_data *err = (struct vm_throw_data *)th->errinfo;
if (state == TAG_BREAK) {
const rb_control_frame_t *escape_cfp = THROW_DATA_CATCH_FRAME(err);
@@ -1881,7 +1881,7 @@ rb_throw_obj(VALUE tag, VALUE value)
rb_exc_raise(rb_class_new_instance(numberof(desc), desc, rb_eUncaughtThrow));
}
- th->errinfo = (VALUE)NEW_THROW_DATA(tag, NULL, TAG_THROW);
+ th->errinfo = (VALUE)THROW_DATA_NEW(tag, NULL, TAG_THROW);
JUMP_TAG(TAG_THROW);
}
@@ -1996,7 +1996,7 @@ rb_catch_protect(VALUE t, rb_block_call_func *func, VALUE data, int *stateptr)
/* call with argc=1, argv = [tag], block = Qnil to insure compatibility */
val = (*func)(tag, data, 1, (const VALUE *)&tag, Qnil);
}
- else if (state == TAG_THROW && THROW_DATA_VAL((struct THROW_DATA *)th->errinfo) == tag) {
+ else if (state == TAG_THROW && THROW_DATA_VAL((struct vm_throw_data *)th->errinfo) == tag) {
rb_vm_rewind_cfp(th, saved_cfp);
val = th->tag->retval;
th->errinfo = Qnil;