summaryrefslogtreecommitdiff
path: root/eval_intern.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-14 07:17:17 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-14 07:17:17 +0000
commitd5e687b724f067fbd83652ed8f6aa037395861c0 (patch)
treefcb2f0fd8bc9f1d61c42dbc1801f7d42df7f3989 /eval_intern.h
parent8b92f5df326ed21d1afeb8e7a6f46587846c9a1f (diff)
* vm.h, eval_intern.h: move some macros to eval_intern.h.
* eval_jump.ci (rb_f_throw): fix to use NEW_THROW_OBJECT(). * eval.c (rb_f_loop): remove additional macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_intern.h')
-rw-r--r--eval_intern.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/eval_intern.h b/eval_intern.h
index 8ee1625..3f4c81b 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -162,10 +162,19 @@ char *strrchr _((const char *, const char));
#define TAG_RAISE 0x6
#define TAG_THROW 0x7
#define TAG_FATAL 0x8
-#define TAG_CONTCALL 0x9
-#define TAG_THREAD 0xa
#define TAG_MASK 0xf
+#define NEW_THROW_OBJECT(val, pt, st) \
+ ((VALUE)NEW_NODE(NODE_LIT, (val), (pt), (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) ((VALUE*)RNODE((obj))->u2.value)
+#define GET_THROWOBJ_STATE(obj) ((int)RNODE((obj))->u3.value)
+
#define SCOPE_TEST(f) \
(ruby_cref()->nd_visi & (f))