summaryrefslogtreecommitdiff
path: root/ext/objspace
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-11 10:36:17 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-11 10:36:17 +0000
commit0952b43b9be23688702368f6fcae3fde2dd69fb5 (patch)
tree6086aac025130e9f85eb74dc446d0336bfed545b /ext/objspace
parent5922c954614e5947a548780bb3b894626affe6dd (diff)
* include/ruby/ruby.h: introduce new type T_IMEMO.
T_IMEMO is Internal Memo type, internal use only. T_IMEMO has same purpose of NODE_MEMO. To insert T_IMEMO, type numbers are modified a little. * internal.h: define struct RIMemo. Each RIMemo objects has imemo_type. We can observe it by the imemo_type() function. * gc.c (rb_imemo_new): added. * node.h: remove NODE_CREF and NEW_CREF(). * node.c (rb_gc_mark_node): ditto. * vm.c (vm_cref_new): use rb_imem_new(). * vm_eval.c: ditto. * vm_eval.c (eval_string_with_cref): * vm_eval.c (rb_type_str): * vm_insnhelper.c: use RIMemo objects for CREF. * ext/objspace/objspace.c: support T_IMEMO. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/objspace')
-rw-r--r--ext/objspace/objspace.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c
index 038461a..fe07ca8 100644
--- a/ext/objspace/objspace.c
+++ b/ext/objspace/objspace.c
@@ -56,6 +56,7 @@ total_i(void *vstart, void *vend, size_t stride, void *ptr)
if (RBASIC(v)->flags) {
switch (BUILTIN_TYPE(v)) {
case T_NONE:
+ case T_IMEMO:
case T_ICLASS:
case T_NODE:
case T_ZOMBIE:
@@ -166,6 +167,7 @@ type2sym(enum ruby_value_type i)
CASE_TYPE(T_SYMBOL);
CASE_TYPE(T_FIXNUM);
CASE_TYPE(T_UNDEF);
+ CASE_TYPE(T_IMEMO);
CASE_TYPE(T_NODE);
CASE_TYPE(T_ICLASS);
CASE_TYPE(T_ZOMBIE);
@@ -390,7 +392,6 @@ count_nodes(int argc, VALUE *argv, VALUE os)
COUNT_NODE(NODE_SCLASS);
COUNT_NODE(NODE_COLON2);
COUNT_NODE(NODE_COLON3);
- COUNT_NODE(NODE_CREF);
COUNT_NODE(NODE_DOT2);
COUNT_NODE(NODE_DOT3);
COUNT_NODE(NODE_FLIP2);