From 0952b43b9be23688702368f6fcae3fde2dd69fb5 Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 11 Mar 2015 10:36:17 +0000 Subject: * 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 --- include/ruby/ruby.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include/ruby/ruby.h') diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index a35186c949..32a6d23b2e 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -448,11 +448,12 @@ enum ruby_value_type { RUBY_T_FALSE = 0x13, RUBY_T_SYMBOL = 0x14, RUBY_T_FIXNUM = 0x15, + RUBY_T_UNDEF = 0x16, - RUBY_T_UNDEF = 0x1b, - RUBY_T_NODE = 0x1c, - RUBY_T_ICLASS = 0x1d, - RUBY_T_ZOMBIE = 0x1e, + RUBY_T_IMEMO = 0x1a, + RUBY_T_NODE = 0x1b, + RUBY_T_ICLASS = 0x1c, + RUBY_T_ZOMBIE = 0x1d, RUBY_T_MASK = 0x1f }; @@ -479,6 +480,7 @@ enum ruby_value_type { #define T_SYMBOL RUBY_T_SYMBOL #define T_RATIONAL RUBY_T_RATIONAL #define T_COMPLEX RUBY_T_COMPLEX +#define T_IMEMO RUBY_T_IMEMO #define T_UNDEF RUBY_T_UNDEF #define T_NODE RUBY_T_NODE #define T_ZOMBIE RUBY_T_ZOMBIE -- cgit v1.2.3