aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.h
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_insnhelper.h
parentb6d5ce7975667cc32d7d86a992d5206627e5ff73 (diff)
downloadruby-ae166317a4cceeaa195760f675f89a4afec0feee.tar.gz
* 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_insnhelper.h')
-rw-r--r--vm_insnhelper.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/vm_insnhelper.h b/vm_insnhelper.h
index 31f8ffc4e6..6cbf8b6fa9 100644
--- a/vm_insnhelper.h
+++ b/vm_insnhelper.h
@@ -146,21 +146,21 @@ enum vm_regan_acttype {
/**********************************************************/
#define COPY_CREF_OMOD(c1, c2) do { \
- RB_OBJ_WRITE((c1), &(c1)->nd_refinements, (c2)->nd_refinements); \
- if (!NIL_P((c2)->nd_refinements)) { \
- (c1)->flags |= NODE_FL_CREF_OMOD_SHARED; \
- (c2)->flags |= NODE_FL_CREF_OMOD_SHARED; \
+ RB_OBJ_WRITE((c1), &CREF_REFINEMENTS(c1), CREF_REFINEMENTS(c2)); \
+ if (!CREF_REFINEMENTS(c2)) { \
+ CREF_OMOD_SHARED_SET(c1); \
+ CREF_OMOD_SHARED_SET(c2); \
} \
} while (0)
#define COPY_CREF(c1, c2) do { \
NODE *__tmp_c2 = (c2); \
COPY_CREF_OMOD(c1, __tmp_c2); \
- RB_OBJ_WRITE((c1), &(c1)->nd_clss, __tmp_c2->nd_clss); \
- (c1)->nd_visi = __tmp_c2->nd_visi;\
- RB_OBJ_WRITE((c1), &(c1)->nd_next, __tmp_c2->nd_next); \
- if (__tmp_c2->flags & NODE_FL_CREF_PUSHED_BY_EVAL) { \
- (c1)->flags |= NODE_FL_CREF_PUSHED_BY_EVAL; \
+ RB_OBJ_WRITE((c1), &CREF_CLASS(c1), CREF_CLASS(__tmp_c2)); \
+ CREF_VISI_SET((c1), CREF_VISI(__tmp_c2));\
+ RB_OBJ_WRITE((c1), &CREF_NEXT(c1), CREF_NEXT(__tmp_c2)); \
+ if (CREF_PUSHED_BY_EVAL(__tmp_c2)) { \
+ CREF_PUSHED_BY_EVAL_SET(c1); \
} \
} while (0)