mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
5922c95461
commit
0952b43b9b
10 changed files with 104 additions and 27 deletions
5
node.c
5
node.c
|
@ -1069,11 +1069,6 @@ rb_gc_mark_node(NODE *obj)
|
|||
rb_gc_mark(RNODE(obj)->u2.value);
|
||||
break;
|
||||
|
||||
case NODE_CREF:
|
||||
rb_gc_mark(CREF_REFINEMENTS((rb_cref_t *)obj));
|
||||
rb_gc_mark(CREF_CLASS((rb_cref_t *)obj));
|
||||
return (VALUE)CREF_NEXT((rb_cref_t *)obj);
|
||||
|
||||
default: /* unlisted NODE */
|
||||
rb_gc_mark_maybe(RNODE(obj)->u1.value);
|
||||
rb_gc_mark_maybe(RNODE(obj)->u2.value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue