summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-29 07:29:48 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-29 07:29:48 +0000
commit68bc47726b8afef80885a3f698b5c0fceec48d77 (patch)
tree85575066692a78748c27a6b28394e85ed6f15b35
parent4e560cffd6266c08cb856d1b2c25f796522bcc9e (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--eval.c16
-rw-r--r--gc.c2
-rw-r--r--node.h4
-rw-r--r--parse.y6
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 <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").
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";
}
@@ -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;
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 {