MessageNd.st
changeset 96 ae3b3d960476
parent 95 13c0174506d3
child 102 77e4d1119ff2
--- a/MessageNd.st	Tue Jun 06 06:04:36 1995 +0200
+++ b/MessageNd.st	Tue Jun 27 04:17:58 1995 +0200
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libcomp/Attic/MessageNd.st,v 1.23 1995-06-06 04:04:02 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Attic/MessageNd.st,v 1.24 1995-06-27 02:17:20 claus Exp $
 '!
 
 !MessageNode class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libcomp/Attic/MessageNd.st,v 1.23 1995-06-06 04:04:02 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Attic/MessageNd.st,v 1.24 1995-06-27 02:17:20 claus Exp $
 "
 !
 
@@ -526,10 +526,9 @@
 
     receiver isSuper ifTrue:[
 	r := receiver value.
-	receiver isHere ifTrue:[
-	    class := receiver definingClass.
-	] ifFalse:[
-	    class := receiver definingClass superclass.
+	class := receiver definingClass.
+	receiver isHere ifFalse:[
+	    class := class superclass.
 	].
 	argArray notNil ifTrue:[
 	    argValueArray := argArray collect:[:arg | arg evaluate].
@@ -1022,7 +1021,7 @@
 !
 
 codeOn:aStream inBlock:b valueNeeded:valueNeeded
-    |nargs isBuiltIn|
+    |nargs isBuiltIn code|
 
     argArray isNil ifTrue:[
 	nargs := 0
@@ -1156,11 +1155,11 @@
     ].
     receiver isSuper ifTrue:[
 	receiver isHere ifTrue:[
-	    aStream nextPut:#hereSend
+	    code := #hereSend
 	] ifFalse:[
-	    aStream nextPut:#superSend.
+	    code := #superSend.
 	].
-	aStream nextPut:lineNr; nextPut:selector; nextPut:nargs; nextPut:nil.
+	aStream nextPut:code; nextPut:lineNr; nextPut:selector; nextPut:nargs; nextPut:nil.
 	valueNeeded ifFalse:[
 	    aStream nextPut:#drop
 	].
@@ -1188,18 +1187,18 @@
     ].
 
     valueNeeded ifTrue:[
-	aStream nextPut:#send
+	code := #send
     ] ifFalse:[
-	aStream nextPut:#sendDrop
+	code := #sendDrop
     ].
-    aStream nextPut:lineNr; nextPut:selector; nextPut:nargs
+    aStream nextPut:code; nextPut:lineNr; nextPut:selector; nextPut:nargs
 !
 
 codeSendOn:aStream inBlock:b valueNeeded:valueNeeded
     "like code on, but assumes that receiver has already been
      coded onto stack - needed for cascade"
 
-    |nargs isBuiltIn|
+    |nargs isBuiltIn code|
 
     argArray isNil ifTrue:[
 	nargs := 0
@@ -1247,11 +1246,11 @@
 
     receiver isSuper ifTrue:[
 	receiver isHere ifTrue:[
-	    aStream nextPut:#hereSend
+	    code := #hereSend
 	] ifFalse:[
-	    aStream nextPut:#superSend.
+	    code := #superSend.
 	].
-	aStream nextPut:lineNr; nextPut:selector; nextPut:nargs; nextPut:nil.
+	aStream nextPut:code; nextPut:lineNr; nextPut:selector; nextPut:nargs; nextPut:nil.
 	valueNeeded ifFalse:[
 	    aStream nextPut:#drop
 	].
@@ -1271,25 +1270,26 @@
 
     (nargs <= 3) ifTrue:[
 	valueNeeded ifTrue:[
-	    aStream nextPut:( #( send0 send1 send2 send3) at:(nargs+1) ).
+	    code := #(send0 send1 send2 send3) at:(nargs+1).
 	] ifFalse:[
-	    aStream nextPut:( #( sendDrop0 sendDrop1 sendDrop2 sendDrop3) at:(nargs+1) ).
+	    code := #(sendDrop0 sendDrop1 sendDrop2 sendDrop3) at:(nargs+1).
 	].
-	aStream nextPut:lineNr; nextPut:selector.
+	aStream nextPut:code; nextPut:lineNr; nextPut:selector.
 	^ self
     ].
 
     valueNeeded ifTrue:[
-	aStream nextPut:#send
+	code := #send
     ] ifFalse:[
-	aStream nextPut:#sendDrop
+	code := #sendDrop
     ].
-    aStream nextPut:lineNr; nextPut:selector; nextPut:nargs
+    aStream nextPut:code; nextPut:lineNr; nextPut:selector; nextPut:nargs
 !
 
 codeForCascadeOn:aStream inBlock:b
     "like codeOn, but always leave the receiver instead of the result"
-    |nargs isBuiltIn|
+
+    |nargs isBuiltIn code|
 
     argArray isNil ifTrue:[
 	nargs := 0
@@ -1334,16 +1334,16 @@
     ].
     receiver isSuper ifTrue:[
 	receiver isHere ifTrue:[
-	    aStream nextPut:#hereSend
+	    code := #hereSend
 	] ifFalse:[
-	    aStream nextPut:#superSend.
+	    code := #superSend.
 	].
-	aStream nextPut:lineNr; nextPut:selector; nextPut:nargs; nextPut:nil; nextPut:#drop.
+	aStream nextPut:code; nextPut:lineNr; nextPut:selector; nextPut:nargs; nextPut:nil; nextPut:#drop.
 	^ self
     ].
     (nargs <= 3) ifTrue:[
-	aStream nextPut:( #( sendDrop0 sendDrop1 sendDrop2 sendDrop3) at:(nargs+1) ).
-	aStream nextPut:lineNr; nextPut:selector.
+	code := #(sendDrop0 sendDrop1 sendDrop2 sendDrop3) at:(nargs+1).
+	aStream nextPut:code; nextPut:lineNr; nextPut:selector.
 	^ self
     ].