From 68bc47726b8afef80885a3f698b5c0fceec48d77 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 29 Aug 2000 07:29:48 +0000 Subject: matz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ eval.c | 16 ---------------- gc.c | 2 -- node.h | 4 ---- parse.y | 6 ++---- 5 files changed, 8 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5275273d61..aa2e30f178 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Aug 29 16:29:15 2000 Yukihiro Matsumoto + + * parse.y (assignable): remove NODE_CVASGN3. + + * parse.y (gettable): remove NODE_CVAR3. + Tue Aug 29 02:02:14 2000 Yukihiro Matsumoto * lib/mkmf.rb (create_makefile): handles create_makefile("a/b"). diff --git a/eval.c b/eval.c index c3bdd7b43a..0ed7ca3555 100644 --- a/eval.c +++ b/eval.c @@ -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"; } @@ -2583,11 +2576,6 @@ rb_eval(self, n) break; 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; diff --git a/gc.c b/gc.c index 9681a9717e..93802f46ab 100644 --- a/gc.c +++ b/gc.c @@ -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: diff --git a/node.h b/node.h index b29355dbe2..cf6e23c255 100644 --- a/node.h +++ b/node.h @@ -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) diff --git a/parse.y b/parse.y index 9b246be7e1..6e0e6dc7de 100644 --- a/parse.y +++ b/parse.y @@ -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 { -- cgit v1.2.3