summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--compile.c5
-rw-r--r--gc.c1
-rw-r--r--iseq.c2
-rw-r--r--parse.y4
5 files changed, 9 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index ebbfa1ad9..c484b395f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,12 @@ Fri Feb 2 18:27:54 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c: remove duplicated global variables rb_cProc and
rb_cBinding. [ruby-dev:30242]
+Thu Feb 1 21:04:39 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * parse.y (assignable_gen): no need to generate NODE_CVDECL.
+
+ * compile.c (iseq_compile_each): no NODE_CVDECL.
+
Thu Feb 1 20:53:32 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* vm.c (eval_get_cvar_base): destination for class variable access
diff --git a/compile.c b/compile.c
index c46951a13..c8ddb2f80 100644
--- a/compile.c
+++ b/compile.c
@@ -3347,15 +3347,14 @@ iseq_compile_each(yarv_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
break;
}
- case NODE_CVASGN:
- case NODE_CVDECL:{
+ case NODE_CVASGN:{
COMPILE(ret, "cvasgn val", node->nd_value);
if (!poped) {
ADD_INSN(ret, nd_line(node), dup);
}
ADD_INSN2(ret, nd_line(node), setclassvariable,
ID2SYM(node->nd_vid),
- nd_type(node) == NODE_CVDECL ? Qtrue : Qfalse);
+ Qfalse);
break;
}
case NODE_OP_ASGN1:{
diff --git a/gc.c b/gc.c
index 510682772..6c75f011b 100644
--- a/gc.c
+++ b/gc.c
@@ -896,7 +896,6 @@ gc_mark_children(VALUE ptr, int lev)
case NODE_DASGN:
case NODE_DASGN_CURR:
case NODE_IASGN:
- case NODE_CVDECL:
case NODE_CVASGN:
case NODE_COLON3:
case NODE_OPT_N:
diff --git a/iseq.c b/iseq.c
index e199e4986..b765001be 100644
--- a/iseq.c
+++ b/iseq.c
@@ -867,8 +867,6 @@ node_name(int node)
return "NODE_CDECL";
case NODE_CVASGN:
return "NODE_CVASGN";
- case NODE_CVDECL:
- return "NODE_CVDECL";
case NODE_OP_ASGN1:
return "NODE_OP_ASGN1";
case NODE_OP_ASGN2:
diff --git a/parse.y b/parse.y
index 3bdc9901d..1d93b5cd0 100644
--- a/parse.y
+++ b/parse.y
@@ -7304,8 +7304,7 @@ assignable_gen(struct parser_params *parser, ID id, NODE *val)
return NEW_CDECL(id, val, 0);
}
else if (is_class_id(id)) {
- if (in_def || in_single) return NEW_CVASGN(id, val);
- return NEW_CVDECL(id, val);
+ return NEW_CVASGN(id, val);
}
else {
rb_compile_error("identifier %s is not valid", rb_id2name(id));
@@ -7438,7 +7437,6 @@ node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs)
case NODE_DASGN_CURR:
case NODE_MASGN:
case NODE_CDECL:
- case NODE_CVDECL:
case NODE_CVASGN:
lhs->nd_value = rhs;
break;