aboutsummaryrefslogtreecommitdiffstats
path: root/internal.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-11 13:31:11 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-11 13:31:11 +0000
commit7790f37efdd8dd42a0a43c3206f6afdd43f8e86a (patch)
tree38d8c41ba56f432da983148757c6c8b7ee36196b /internal.h
parent48cb7391190612c77375f924c1e202178f09f559 (diff)
downloadruby-7790f37efdd8dd42a0a43c3206f6afdd43f8e86a.tar.gz
* node.h: remove NODE_IFUNC, NEW_IFUNC.
* internal.h: use T_IMEMO for IFUNC. rename `struct IFUNC' to `struct vm_ifunc' and move the definition from vm_insnhelper.h. Add imemo_ifunc. * gc.c (gc_mark_children): mark imemo_ifunc type T_IMEMO object. * compile.c: catch up these changes. * proc.c: ditto. * vm_core.h (RUBY_VM_IFUNC_P): ditto. * vm_eval.c (rb_iterate): ditto. * vm_insnhelper.c: ditto. * ext/objspace/objspace.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49938 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 9069de1c83..0ac09bceeb 100644
--- a/internal.h
+++ b/internal.h
@@ -534,6 +534,7 @@ enum imemo_type {
imemo_cref,
imemo_svar,
imemo_throw_data,
+ imemo_ifunc,
imemo_mask = 0x07
};
@@ -577,6 +578,18 @@ struct vm_throw_data {
#define THROW_DATA_P(err) RB_TYPE_P((err), T_IMEMO)
+/* IFUNC */
+
+struct vm_ifunc {
+ VALUE flags;
+ VALUE reserved;
+ VALUE (*func)(ANYARGS);
+ const void *data;
+ ID id;
+};
+
+#define IFUNC_NEW(a, b) ((struct vm_ifunc *)rb_imemo_new(imemo_ifunc, (VALUE)(a), (VALUE)(b), 0, 0))
+
/* MEMO */
struct MEMO {