*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Thu, 27 Mar 2003 16:57:13 +0100
changeset 1381 695fa03a5795
parent 1380 7288e4623e2b
child 1382 10281d2f42d1
*** empty log message ***
ConstantNode.st
PrimaryNode.st
ReturnNode.st
--- a/ConstantNode.st	Thu Mar 27 14:59:40 2003 +0100
+++ b/ConstantNode.st	Thu Mar 27 16:57:13 2003 +0100
@@ -107,27 +107,27 @@
     "the most common case first ..."
 
     (anObject isMemberOf:SmallInteger) ifTrue:[
-	^ #Integer
+        ^ #Integer
     ].
 
     anObject isNil ifTrue:[
-	^ #Nil
+        ^ #Nil
     ].
 
     anObject isNumber ifTrue:[
-	"the most common case first ..."
-	(anObject isMemberOf:Float) ifTrue:[
-	    ^ #Float
-	].
-	anObject isInteger ifTrue:[
-	    ^ #Integer
-	].
+        "the most common case first ..."
+        (anObject isMemberOf:Float) ifTrue:[
+            ^ #Float
+        ].
+        anObject isInteger ifTrue:[
+            ^ #Integer
+        ].
     ].
     (anObject == true) ifTrue:[
-	^ #True
+        ^ #True
     ].
     (anObject == false) ifTrue:[
-	^ #False
+        ^ #False
     ].
     ^ #Literal
 ! !
@@ -329,5 +329,5 @@
 !ConstantNode class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/ConstantNode.st,v 1.30 2002-11-26 10:47:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ConstantNode.st,v 1.31 2003-03-27 15:56:02 cg Exp $'
 ! !
--- a/PrimaryNode.st	Thu Mar 27 14:59:40 2003 +0100
+++ b/PrimaryNode.st	Thu Mar 27 16:57:13 2003 +0100
@@ -92,6 +92,13 @@
 
 !PrimaryNode methodsFor:'queries'!
 
+isImmutable
+    "not used with ST/X - 
+     for JavaScript nodes return true here."
+
+    ^ true
+!
+
 isPrimary
     "return true, if this is a node for a primary (i.e. non-send)"
 
@@ -101,5 +108,5 @@
 !PrimaryNode class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/PrimaryNode.st,v 1.20 2000-08-31 10:03:12 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/PrimaryNode.st,v 1.21 2003-03-27 15:57:13 cg Exp $'
 ! !
--- a/ReturnNode.st	Thu Mar 27 14:59:40 2003 +0100
+++ b/ReturnNode.st	Thu Mar 27 16:57:13 2003 +0100
@@ -86,12 +86,17 @@
 
 codeOn:aStream inBlock:b for:aCompiler
     b isNil ifTrue:[
-        ^ self class
-            codeSimpleReturnFor:expression 
-            inBlock:nil 
-            on:aStream 
-            inLine:lineNr 
-            for:aCompiler
+        expression isNil ifTrue:[
+            aStream nextPut:#retNil.
+        ] ifFalse:[
+            self class
+                codeSimpleReturnFor:expression 
+                inBlock:nil 
+                on:aStream 
+                inLine:lineNr 
+                for:aCompiler.
+        ].
+        ^ self.
     ].
 
     expression codeOn:aStream inBlock:b for:aCompiler.
@@ -149,5 +154,5 @@
 !ReturnNode class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/ReturnNode.st,v 1.26 2000-11-21 20:22:32 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ReturnNode.st,v 1.27 2003-03-27 15:56:27 cg Exp $'
 ! !