checkin from browser
authorClaus Gittinger <cg@exept.de>
Fri, 01 Dec 2000 16:23:00 +0100
changeset 1120 e321d1945854
parent 1119 bbdab29749c1
child 1121 161afbb078ff
checkin from browser
UnaryNode.st
--- a/UnaryNode.st	Fri Dec 01 16:22:38 2000 +0100
+++ b/UnaryNode.st	Fri Dec 01 16:23:00 2000 +0100
@@ -298,6 +298,33 @@
 
 !UnaryNode methodsFor:'queries'!
 
+isConstant
+    "return true, if this node evaluates to a constant value"
+
+"/ not worth it ...
+"/ (and might lead to trouble whenever a common bytecode standard
+"/  is ever available)
+"/
+"/    receiver isGlobal ifTrue:[
+"/        receiver name = 'Smalltalk' ifTrue:[
+"/            selector == #isSmalltalkX ifTrue:[
+"/                ^ true
+"/            ].
+"/            selector == #isSqueak ifTrue:[
+"/                ^ true
+"/            ].
+"/            selector == #isVisualWorks ifTrue:[
+"/                ^ true
+"/            ].
+"/            selector == #isVisualAge ifTrue:[
+"/                ^ true
+"/            ].
+"/        ]
+"/    ].
+
+    ^ false
+!
+
 isUnaryMessage
     "return true, if this node is one for a unary message"
 
@@ -309,5 +336,5 @@
 !UnaryNode class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/UnaryNode.st,v 1.34 2000-10-11 12:47:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/UnaryNode.st,v 1.35 2000-12-01 15:23:00 cg Exp $'
 ! !