aboutsummaryrefslogtreecommitdiffstats
path: root/insns.def
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-08 21:22:43 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-08 21:22:43 +0000
commit8dced4d2c0f284bd17a3cb4a4fbed6d459cc71e0 (patch)
tree3d7836fd4b98251ca69231fd5a0f8088563e7022 /insns.def
parent2324c14d00c301467ac9a3a5fc95d812109e116f (diff)
downloadruby-8dced4d2c0f284bd17a3cb4a4fbed6d459cc71e0.tar.gz
* internal.h: define rb_cref_t and change to use it.
rb_cref_t is data type of CREF. Now, the body is still NODE. It is easy to understand what is CREF and what is pure NODE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def8
1 files changed, 3 insertions, 5 deletions
diff --git a/insns.def b/insns.def
index 761d1fc5eb..7cfd2ee521 100644
--- a/insns.def
+++ b/insns.def
@@ -159,8 +159,7 @@ getclassvariable
()
(VALUE val)
{
- NODE *cref = rb_vm_get_cref(GET_EP());
- val = rb_cvar_get(vm_get_cvar_base(cref, GET_CFP()), id);
+ val = rb_cvar_get(vm_get_cvar_base(rb_vm_get_cref(GET_EP()), GET_CFP()), id);
}
/**
@@ -174,8 +173,7 @@ setclassvariable
(VALUE val)
()
{
- NODE *cref = rb_vm_get_cref(GET_EP());
- rb_cvar_set(vm_get_cvar_base(cref, GET_CFP()), id, val);
+ rb_cvar_set(vm_get_cvar_base(rb_vm_get_cref(GET_EP()), GET_CFP()), id, val);
}
/**
@@ -738,7 +736,7 @@ defined
}
break;
case DEFINED_CVAR: {
- NODE *cref = rb_vm_get_cref(GET_EP());
+ const rb_cref_t *cref = rb_vm_get_cref(GET_EP());
klass = vm_get_cvar_base(cref, GET_CFP());
if (rb_cvar_defined(klass, SYM2ID(obj))) {
expr_type = DEFINED_CVAR;