1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* internal.h: define CREF accessor macros.

* CREF_CLASS(cref)
  * CREF_NEXT(cref)
  * CREF_VISI(cref)
  * CREF_VISI_SET(cref, v)
  * CREF_REFINEMENTS(cref)
  * CREF_PUSHED_BY_EVAL(cref)
  * CREF_PUSHED_BY_EVAL_SET(cref)
  * CREF_OMOD_SHARED(cref)
  * CREF_OMOD_SHARED_SET(cref)
  * CREF_OMOD_SHARED_UNSET(cref)
  This is process to change CREF data type from NODE.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2015-03-08 19:50:37 +00:00
parent b6d5ce7975
commit ae166317a4
12 changed files with 113 additions and 85 deletions

8
node.c
View file

@ -947,7 +947,7 @@ rb_gc_mark_node(NODE *obj)
{
switch (nd_type(obj)) {
case NODE_IF: /* 1,2,3 */
rb_gc_mark(obj->nd_refinements); /* use as SVAR */
rb_gc_mark(CREF_REFINEMENTS(obj)); /* use as SVAR */
case NODE_FOR:
case NODE_ITER:
case NODE_WHEN:
@ -1070,9 +1070,9 @@ rb_gc_mark_node(NODE *obj)
break;
case NODE_CREF:
rb_gc_mark(obj->nd_refinements);
rb_gc_mark(RNODE(obj)->nd_clss);
return (VALUE)RNODE(obj)->nd_next;
rb_gc_mark(CREF_REFINEMENTS(obj));
rb_gc_mark(CREF_CLASS(obj));
return (VALUE)CREF_NEXT(obj);;
default: /* unlisted NODE */
rb_gc_mark_maybe(RNODE(obj)->u1.value);