--- a/MessageNode.st Sat Nov 05 01:03:31 1994 +0100
+++ b/MessageNode.st Thu Nov 17 15:23:23 1994 +0100
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libcomp/MessageNode.st,v 1.13 1994-11-05 00:03:31 claus Exp $
+$Header: /cvs/stx/stx/libcomp/MessageNode.st,v 1.14 1994-11-17 14:22:46 claus Exp $
'!
!MessageNode class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/MessageNode.st,v 1.13 1994-11-05 00:03:31 claus Exp $
+$Header: /cvs/stx/stx/libcomp/MessageNode.st,v 1.14 1994-11-17 14:22:46 claus Exp $
"
!
@@ -466,8 +466,11 @@
receiver isSuper ifTrue:[
r := receiver value.
-"/ class := receiver definingClass superclass.
- class := receiver searchClass.
+ receiver isHere ifTrue:[
+ class := receiver definingClass.
+ ] ifFalse:[
+ class := receiver definingClass superclass.
+ ].
argArray notNil ifTrue:[
argValueArray := argArray collect:[:arg | arg evaluate].
] ifFalse:[
@@ -505,8 +508,11 @@
receiver isSuper ifTrue:[
r := receiver value.
-"/ class := receiver definingClass superclass.
- class := receiver searchClass.
+ receiver isHere ifTrue:[
+ class := receiver definingClass.
+ ] ifFalse:[
+ class := receiver definingClass superclass.
+ ].
argArray notNil ifTrue:[
argValueArray := argArray collect:[:arg | arg evaluate].
] ifFalse:[
@@ -1057,7 +1063,11 @@
]
].
receiver isSuper ifTrue:[
- aStream nextPut:#superSend.
+ receiver isHere ifTrue:[
+ aStream nextPut:#hereSend
+ ] ifFalse:[
+ aStream nextPut:#superSend.
+ ].
aStream nextPut:lineNr.
aStream nextPut:selector.
aStream nextPut:nargs.
@@ -1067,78 +1077,29 @@
].
^ self
].
- (nargs == 0) ifTrue:[
+
+ (nargs <= 3) ifTrue:[
+ |codes|
+
valueNeeded ifTrue:[
(receiver type == #Self) ifTrue:[
- aStream nextPut:#sendSelf0
+ codes := #(sendSelf0 sendSelf1 sendSelf2 sendSelf3)
] ifFalse:[
- aStream nextPut:#send0
+ codes := #(send0 send1 send2 send3)
]
] ifFalse:[
(receiver type == #Self) ifTrue:[
- aStream nextPut:#sendSelfDrop0
+ codes := #(sendSelfDrop0 sendSelfDrop1 sendSelfDrop2 sendSelfDrop3)
] ifFalse:[
- aStream nextPut:#sendDrop0
+ codes := #(sendDrop0 sendDrop1 sendDrop2 sendDrop3)
]
].
- aStream nextPut:lineNr.
- aStream nextPut:selector.
- ^ self
- ].
- (nargs == 1) ifTrue:[
- valueNeeded ifTrue:[
- (receiver type == #Self) ifTrue:[
- aStream nextPut:#sendSelf1
- ] ifFalse:[
- aStream nextPut:#send1
- ]
- ] ifFalse:[
- (receiver type == #Self) ifTrue:[
- aStream nextPut:#sendSelfDrop1
- ] ifFalse:[
- aStream nextPut:#sendDrop1
- ]
- ].
+ aStream nextPut:(codes at:nargs + 1).
aStream nextPut:lineNr.
aStream nextPut:selector.
^ self
].
- (nargs == 2) ifTrue:[
- valueNeeded ifTrue:[
- (receiver type == #Self) ifTrue:[
- aStream nextPut:#sendSelf2
- ] ifFalse:[
- aStream nextPut:#send2
- ]
- ] ifFalse:[
- (receiver type == #Self) ifTrue:[
- aStream nextPut:#sendSelfDrop2
- ] ifFalse:[
- aStream nextPut:#sendDrop2
- ]
- ].
- aStream nextPut:lineNr.
- aStream nextPut:selector.
- ^ self
- ].
- (nargs == 3) ifTrue:[
- valueNeeded ifTrue:[
- (receiver type == #Self) ifTrue:[
- aStream nextPut:#sendSelf3
- ] ifFalse:[
- aStream nextPut:#send3
- ]
- ] ifFalse:[
- (receiver type == #Self) ifTrue:[
- aStream nextPut:#sendSelfDrop3
- ] ifFalse:[
- aStream nextPut:#sendDrop3
- ]
- ].
- aStream nextPut:lineNr.
- aStream nextPut:selector.
- ^ self
- ].
+
valueNeeded ifTrue:[
aStream nextPut:#send
] ifFalse:[
@@ -1200,7 +1161,11 @@
].
receiver isSuper ifTrue:[
- aStream nextPut:#superSend.
+ receiver isHere ifTrue:[
+ aStream nextPut:#hereSend
+ ] ifFalse:[
+ aStream nextPut:#superSend.
+ ].
aStream nextPut:lineNr.
aStream nextPut:selector.
aStream nextPut:nargs.
@@ -1220,46 +1185,19 @@
].
^ self
].
+ ].
+ (nargs <= 3) ifTrue:[
valueNeeded ifTrue:[
- aStream nextPut:#send0
+ aStream nextPut:( #( send0 send1 send2 send3) at:(nargs+1) ).
] ifFalse:[
- aStream nextPut:#sendDrop0
- ].
- aStream nextPut:lineNr.
- aStream nextPut:selector.
- ^ self
- ].
- (nargs == 1) ifTrue:[
- valueNeeded ifTrue:[
- aStream nextPut:#send1
- ] ifFalse:[
- aStream nextPut:#sendDrop1
+ aStream nextPut:( #( sendDrop0 sendDrop1 sendDrop2 sendDrop3) at:(nargs+1) ).
].
aStream nextPut:lineNr.
aStream nextPut:selector.
^ self
].
- (nargs == 2) ifTrue:[
- valueNeeded ifTrue:[
- aStream nextPut:#send2
- ] ifFalse:[
- aStream nextPut:#sendDrop2
- ].
- aStream nextPut:lineNr.
- aStream nextPut:selector.
- ^ self
- ].
- (nargs == 3) ifTrue:[
- valueNeeded ifTrue:[
- aStream nextPut:#send3
- ] ifFalse:[
- aStream nextPut:#sendDrop3
- ].
- aStream nextPut:lineNr.
- aStream nextPut:selector.
- ^ self
- ].
+
valueNeeded ifTrue:[
aStream nextPut:#send
] ifFalse:[
@@ -1318,7 +1256,11 @@
]
].
receiver isSuper ifTrue:[
- aStream nextPut:#superSend.
+ receiver isHere ifTrue:[
+ aStream nextPut:#hereSend
+ ] ifFalse:[
+ aStream nextPut:#superSend.
+ ].
aStream nextPut:lineNr.
aStream nextPut:selector.
aStream nextPut:nargs.
@@ -1326,30 +1268,13 @@
aStream nextPut:#drop.
^ self
].
- (nargs == 0) ifTrue:[
- aStream nextPut:#sendDrop0.
- aStream nextPut:lineNr.
- aStream nextPut:selector.
- ^ self
- ].
- (nargs == 1) ifTrue:[
- aStream nextPut:#sendDrop1.
+ (nargs <= 3) ifTrue:[
+ aStream nextPut:( #( sendDrop0 sendDrop1 sendDrop2 sendDrop3) at:(nargs+1) ).
aStream nextPut:lineNr.
aStream nextPut:selector.
^ self
].
- (nargs == 2) ifTrue:[
- aStream nextPut:#sendDrop2.
- aStream nextPut:lineNr.
- aStream nextPut:selector.
- ^ self
- ].
- (nargs == 3) ifTrue:[
- aStream nextPut:#sendDrop3.
- aStream nextPut:lineNr.
- aStream nextPut:selector.
- ^ self
- ].
+
aStream nextPut:#sendDrop.
aStream nextPut:lineNr.
aStream nextPut:selector.