summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-08 19:50:37 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-08 19:50:37 +0000
commitae166317a4cceeaa195760f675f89a4afec0feee (patch)
tree2acb49ed9eb1037637b7e0b0f0ea98991a27a4ad /vm_eval.c
parentb6d5ce7975667cc32d7d86a992d5206627e5ff73 (diff)
* 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
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/vm_eval.c b/vm_eval.c
index add2aaf..9a97f2b 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -1567,7 +1567,7 @@ yield_under(VALUE under, VALUE self, VALUE values)
VM_CF_LEP(th->cfp)[0] = VM_ENVVAL_BLOCK_PTR(&block);
}
cref = vm_cref_push(th, under, NOEX_PUBLIC, blockptr);
- cref->flags |= NODE_FL_CREF_PUSHED_BY_EVAL;
+ CREF_PUSHED_BY_EVAL_SET(cref);
if (values == Qundef) {
return vm_yield_with_cref(th, 1, &self, cref);
@@ -1590,8 +1590,8 @@ rb_yield_refine_block(VALUE refinement, VALUE refinements)
VM_CF_LEP(th->cfp)[0] = VM_ENVVAL_BLOCK_PTR(&block);
}
cref = vm_cref_push(th, refinement, NOEX_PUBLIC, blockptr);
- cref->flags |= NODE_FL_CREF_PUSHED_BY_EVAL;
- RB_OBJ_WRITE(cref, &cref->nd_refinements, refinements);
+ CREF_PUSHED_BY_EVAL_SET(cref);
+ RB_OBJ_WRITE(cref, &CREF_REFINEMENTS(cref), refinements);
return vm_yield_with_cref(th, 0, NULL, cref);
}
@@ -1603,7 +1603,7 @@ eval_under(VALUE under, VALUE self, VALUE src, VALUE file, int line)
NODE *cref = vm_cref_push(GET_THREAD(), under, NOEX_PUBLIC, NULL);
if (SPECIAL_CONST_P(self) && !NIL_P(under)) {
- cref->flags |= NODE_FL_CREF_PUSHED_BY_EVAL;
+ CREF_PUSHED_BY_EVAL_SET(cref);
}
SafeStringValue(src);