diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-02 10:24:06 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-02 10:24:06 +0000 |
commit | 12aeeeaa3607a6e4696990986f7d76a847cc8a45 (patch) | |
tree | 525b8c698c7e6d21eaa5c466701d0a7cc6198540 | |
parent | 1b7c50a6b849135f4f34a199853ec797ed3b85af (diff) | |
download | ruby-12aeeeaa3607a6e4696990986f7d76a847cc8a45.tar.gz ruby-12aeeeaa3607a6e4696990986f7d76a847cc8a45.tar.xz ruby-12aeeeaa3607a6e4696990986f7d76a847cc8a45.zip |
* parse.y (assignable_gen): no need to generate NODE_CVDECL.
* compile.c (iseq_compile_each): no NODE_CVDECL.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | compile.c | 5 | ||||
-rw-r--r-- | gc.c | 1 | ||||
-rw-r--r-- | iseq.c | 2 | ||||
-rw-r--r-- | parse.y | 4 |
5 files changed, 9 insertions, 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 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 @@ -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:{ @@ -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: @@ -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: @@ -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; |