diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | eval.c | 16 | ||||
-rw-r--r-- | gc.c | 2 | ||||
-rw-r--r-- | node.h | 4 | ||||
-rw-r--r-- | parse.y | 6 |
5 files changed, 8 insertions, 26 deletions
@@ -1,3 +1,9 @@ +Tue Aug 29 16:29:15 2000 Yukihiro Matsumoto <matz@ruby-lang.org> + + * parse.y (assignable): remove NODE_CVASGN3. + + * parse.y (gettable): remove NODE_CVAR3. + Tue Aug 29 02:02:14 2000 Yukihiro Matsumoto <matz@ruby-lang.org> * lib/mkmf.rb (create_makefile): handles create_makefile("a/b"). @@ -1720,7 +1720,6 @@ is_defined(self, node, buf) case NODE_CDECL: case NODE_CVDECL: case NODE_CVASGN2: - case NODE_CVASGN3: return "assignment"; case NODE_LVAR: @@ -1753,12 +1752,6 @@ is_defined(self, node, buf) break; case NODE_CVAR2: - if (rb_cvar_defined(CLASS_OF(self), node->nd_vid)) { - return "class variable"; - } - break; - - case NODE_CVAR3: if (rb_cvar_defined_singleton(self, node->nd_vid)) { return "class variable"; } @@ -2584,11 +2577,6 @@ rb_eval(self, n) case NODE_CVASGN2: result = rb_eval(self, node->nd_value); - rb_cvar_set(CLASS_OF(self), node->nd_vid, result); - break; - - case NODE_CVASGN3: - result = rb_eval(self, node->nd_value); rb_cvar_set_singleton(self, node->nd_vid, result); break; @@ -2628,10 +2616,6 @@ rb_eval(self, n) break; case NODE_CVAR2: - result = rb_cvar_get(CLASS_OF(self), node->nd_vid); - break; - - case NODE_CVAR3: result = rb_cvar_get_singleton(self, node->nd_vid); break; @@ -484,7 +484,6 @@ rb_gc_mark(ptr) case NODE_CDECL: case NODE_CVDECL: case NODE_CVASGN2: - case NODE_CVASGN3: case NODE_MODULE: case NODE_COLON3: case NODE_OPT_N: @@ -521,7 +520,6 @@ rb_gc_mark(ptr) case NODE_IVAR: case NODE_CVAR: case NODE_CVAR2: - case NODE_CVAR3: case NODE_NTH_REF: case NODE_BACK_REF: case NODE_ALIAS: @@ -50,7 +50,6 @@ enum node_type { NODE_IASGN, NODE_CDECL, NODE_CVASGN2, - NODE_CVASGN3, NODE_CVDECL, NODE_OP_ASGN1, NODE_OP_ASGN2, @@ -73,7 +72,6 @@ enum node_type { NODE_CONST, NODE_CVAR, NODE_CVAR2, - NODE_CVAR3, NODE_NTH_REF, NODE_BACK_REF, NODE_MATCH, @@ -270,7 +268,6 @@ typedef struct RNode { #define NEW_IASGN(v,val) rb_node_newnode(NODE_IASGN,v,val,0) #define NEW_CDECL(v,val) rb_node_newnode(NODE_CDECL,v,val,0) #define NEW_CVASGN2(v,val) rb_node_newnode(NODE_CVASGN2,v,val,0) -#define NEW_CVASGN3(v,val) rb_node_newnode(NODE_CVASGN3,v,val,0) #define NEW_CVDECL(v,val) rb_node_newnode(NODE_CVDECL,v,val,0) #define NEW_OP_ASGN1(p,id,a) rb_node_newnode(NODE_OP_ASGN1,p,id,a) #define NEW_OP_ASGN2(r,i,o,val) rb_node_newnode(NODE_OP_ASGN2,r,val,NEW_OP_ASGN22(i,o)) @@ -284,7 +281,6 @@ typedef struct RNode { #define NEW_CONST(v) rb_node_newnode(NODE_CONST,v,0,0) #define NEW_CVAR(v) rb_node_newnode(NODE_CVAR,v,0,0) #define NEW_CVAR2(v) rb_node_newnode(NODE_CVAR2,v,0,0) -#define NEW_CVAR3(v) rb_node_newnode(NODE_CVAR3,v,0,0) #define NEW_NTH_REF(n) rb_node_newnode(NODE_NTH_REF,0,n,local_cnt('~')) #define NEW_BACK_REF(n) rb_node_newnode(NODE_BACK_REF,0,n,local_cnt('~')) #define NEW_MATCH(c) rb_node_newnode(NODE_MATCH,c,0,0) @@ -3944,8 +3944,7 @@ gettable(id) return NEW_CONST(id); } else if (is_class_id(id)) { - if (in_single) return NEW_CVAR3(id); - if (cur_mid) return NEW_CVAR2(id); + if (in_single) return NEW_CVAR2(id); return NEW_CVAR(id); } rb_bug("invalid id for gettable"); @@ -4003,8 +4002,7 @@ assignable(id, val) return NEW_CDECL(id, val); } else if (is_class_id(id)) { - if (in_single) return NEW_CVASGN3(id, val); - if (cur_mid) return NEW_CVASGN2(id, val); + if (in_single) return NEW_CVASGN2(id, val); return NEW_CVDECL(id, val); } else { |