* parse.y (assignable_gen): no need to generate NODE_CVDECL.

* compile.c (iseq_compile_each): no NODE_CVDECL.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-02-02 10:24:06 +00:00
parent d99bcbe583
commit 0abfa1c532
5 changed files with 9 additions and 9 deletions

View File

@ -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

View File

@ -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:{

1
gc.c
View File

@ -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:

2
iseq.c
View File

@ -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:

View File

@ -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;