mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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:
parent
d99bcbe583
commit
0abfa1c532
5 changed files with 9 additions and 9 deletions
|
@ -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
|
* eval.c: remove duplicated global variables rb_cProc and
|
||||||
rb_cBinding. [ruby-dev:30242]
|
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>
|
Thu Feb 1 20:53:32 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* vm.c (eval_get_cvar_base): destination for class variable access
|
* vm.c (eval_get_cvar_base): destination for class variable access
|
||||||
|
|
|
@ -3347,15 +3347,14 @@ iseq_compile_each(yarv_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case NODE_CVASGN:
|
case NODE_CVASGN:{
|
||||||
case NODE_CVDECL:{
|
|
||||||
COMPILE(ret, "cvasgn val", node->nd_value);
|
COMPILE(ret, "cvasgn val", node->nd_value);
|
||||||
if (!poped) {
|
if (!poped) {
|
||||||
ADD_INSN(ret, nd_line(node), dup);
|
ADD_INSN(ret, nd_line(node), dup);
|
||||||
}
|
}
|
||||||
ADD_INSN2(ret, nd_line(node), setclassvariable,
|
ADD_INSN2(ret, nd_line(node), setclassvariable,
|
||||||
ID2SYM(node->nd_vid),
|
ID2SYM(node->nd_vid),
|
||||||
nd_type(node) == NODE_CVDECL ? Qtrue : Qfalse);
|
Qfalse);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case NODE_OP_ASGN1:{
|
case NODE_OP_ASGN1:{
|
||||||
|
|
1
gc.c
1
gc.c
|
@ -896,7 +896,6 @@ gc_mark_children(VALUE ptr, int lev)
|
||||||
case NODE_DASGN:
|
case NODE_DASGN:
|
||||||
case NODE_DASGN_CURR:
|
case NODE_DASGN_CURR:
|
||||||
case NODE_IASGN:
|
case NODE_IASGN:
|
||||||
case NODE_CVDECL:
|
|
||||||
case NODE_CVASGN:
|
case NODE_CVASGN:
|
||||||
case NODE_COLON3:
|
case NODE_COLON3:
|
||||||
case NODE_OPT_N:
|
case NODE_OPT_N:
|
||||||
|
|
2
iseq.c
2
iseq.c
|
@ -867,8 +867,6 @@ node_name(int node)
|
||||||
return "NODE_CDECL";
|
return "NODE_CDECL";
|
||||||
case NODE_CVASGN:
|
case NODE_CVASGN:
|
||||||
return "NODE_CVASGN";
|
return "NODE_CVASGN";
|
||||||
case NODE_CVDECL:
|
|
||||||
return "NODE_CVDECL";
|
|
||||||
case NODE_OP_ASGN1:
|
case NODE_OP_ASGN1:
|
||||||
return "NODE_OP_ASGN1";
|
return "NODE_OP_ASGN1";
|
||||||
case NODE_OP_ASGN2:
|
case NODE_OP_ASGN2:
|
||||||
|
|
4
parse.y
4
parse.y
|
@ -7304,8 +7304,7 @@ assignable_gen(struct parser_params *parser, ID id, NODE *val)
|
||||||
return NEW_CDECL(id, val, 0);
|
return NEW_CDECL(id, val, 0);
|
||||||
}
|
}
|
||||||
else if (is_class_id(id)) {
|
else if (is_class_id(id)) {
|
||||||
if (in_def || in_single) return NEW_CVASGN(id, val);
|
return NEW_CVASGN(id, val);
|
||||||
return NEW_CVDECL(id, val);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rb_compile_error("identifier %s is not valid", rb_id2name(id));
|
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_DASGN_CURR:
|
||||||
case NODE_MASGN:
|
case NODE_MASGN:
|
||||||
case NODE_CDECL:
|
case NODE_CDECL:
|
||||||
case NODE_CVDECL:
|
|
||||||
case NODE_CVASGN:
|
case NODE_CVASGN:
|
||||||
lhs->nd_value = rhs;
|
lhs->nd_value = rhs;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue