summaryrefslogtreecommitdiff
path: root/internal.h
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 /internal.h
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 'internal.h')
-rw-r--r--internal.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/internal.h b/internal.h
index 0a4bcba5fa..af1d267b84 100644
--- a/internal.h
+++ b/internal.h
@@ -533,6 +533,7 @@ enum imemo_type {
imemo_none,
imemo_cref,
imemo_svar,
+ imemo_throw_data,
imemo_mask = 0x07
};
@@ -645,6 +646,18 @@ struct vm_svar {
const VALUE others;
};
+/* THROW_DATA */
+
+struct vm_throw_data {
+ VALUE flags;
+ VALUE reserved;
+ const VALUE throw_obj;
+ const struct rb_control_frame_struct *catch_frame;
+ VALUE throw_state;
+};
+
+#define THROW_DATA_P(err) RB_TYPE_P((err), T_IMEMO)
+
/* MEMO */
struct MEMO {