summaryrefslogtreecommitdiff
path: root/eval_intern.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-10 18:39:46 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-10 18:39:46 (GMT)
commit46cdb8f18766383a9e11b5a6e9a0c010e7e8653a (patch)
treedb3496b8d312e6a7123f176591262e10dc9c3a1a /eval_intern.h
parent9d937bb08640107e13a3f6afece074c753afd974 (diff)
* vm_insnhelper.h: define struct THROW_DATA to represent
throwing data. Also define accessor functions. * eval_intern.h: move related changes into vm_insnhelper.h. Now these MACROs (functions) are only used in vm*.c. There is only THROW_DATA_P(err) to check this data type or not. * 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@49921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_intern.h')
-rw-r--r--eval_intern.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/eval_intern.h b/eval_intern.h
index a8fd716..8a43733 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -199,16 +199,7 @@ enum ruby_tag_type {
#define TAG_FATAL RUBY_TAG_FATAL
#define TAG_MASK RUBY_TAG_MASK
-#define NEW_THROW_OBJECT(val, pt, st) \
- ((VALUE)rb_node_newnode(NODE_LIT, (VALUE)(val), (VALUE)(pt), (VALUE)(st)))
-#define SET_THROWOBJ_CATCH_POINT(obj, val) \
- (RNODE((obj))->u2.value = (val))
-#define SET_THROWOBJ_STATE(obj, val) \
- (RNODE((obj))->u3.value = (val))
-
-#define GET_THROWOBJ_VAL(obj) ((VALUE)RNODE((obj))->u1.value)
-#define GET_THROWOBJ_CATCH_POINT(obj) ((rb_control_frame_t*)RNODE((obj))->u2.value)
-#define GET_THROWOBJ_STATE(obj) ((int)RNODE((obj))->u3.value)
+#define THROW_DATA_P(err) (BUILTIN_TYPE(err) == T_NODE)
#define SCOPE_TEST(f) (CREF_VISI(rb_vm_cref()) & (f))
#define SCOPE_CHECK(f) (CREF_VISI(rb_vm_cref()) == (f))