fixed homeless-optimized-block printString
authorClaus Gittinger <cg@exept.de>
Wed, 29 May 1996 15:19:03 +0200
changeset 1444 cb2493aa4d0c
parent 1443 d747d574e26d
child 1445 c2dc94f9921b
fixed homeless-optimized-block printString
BContext.st
BlockContext.st
--- a/BContext.st	Wed May 29 00:41:19 1996 +0200
+++ b/BContext.st	Wed May 29 15:19:03 1996 +0200
@@ -130,86 +130,91 @@
      sender selSender tryVars possibleBlocks method mWho|
 
     (home isNil or:[home isContext not]) ifTrue:[
-	"
-	 mhmh - an optimized blocks context
-	 should get the block here, and get the method from
-	 that one ...
-	 ... but in 2.10.x, there is no easy way to get to the block
-	 since that one is not in the context.
-	 Starting with 2.11, the new block calling scheme will fix this.
-	"
+        "
+         mhmh - an optimized blocks context
+         should get the block here, and get the method from
+         that one ...
+         ... but in 2.10.x, there is no easy way to get to the block
+         since that one is not in the context.
+         Starting with 2.11, the new block calling scheme will fix this.
+        "
 
-	"temporary kludge - peek into the sender context.
-	 If its a do-like method and there is a single block variable 
-	 in the args or temporaries, that must be the one.
-	 This helps in some cases.
-	"
-	(sender := self sender) notNil ifTrue:[
-	    tryVars := false.
-	    (selSender := sender selector) notNil ifTrue:[
-		(selSender endsWith:'do:') ifTrue:[
-		    tryVars := true.
-		] ifFalse:[
-		    (selSender endsWith:'Do:') ifTrue:[
-			tryVars := true.
-		    ]
-		]
-	    ].
-	    tryVars ifTrue:[
-		possibleBlocks := sender argsAndVars select:[:v | v isBlock].
-		possibleBlocks := possibleBlocks select:[:b | b home isNil].
+        "temporary kludge - peek into the sender context.
+         If its a do-like method and there is a single block variable 
+         in the args or temporaries, that must be the one.
+         This helps in some cases.
+        "
+        (sender := self sender) notNil ifTrue:[
+            tryVars := false.
+            (selSender := sender selector) notNil ifTrue:[
+                (selSender endsWith:'do:') ifTrue:[
+                    tryVars := true.
+                ] ifFalse:[
+                    (selSender endsWith:'Do:') ifTrue:[
+                        tryVars := true.
+                    ]
+                ]
+            ].
+            tryVars ifTrue:[
+                possibleBlocks := sender argsAndVars select:[:v | v isBlock].
+                possibleBlocks := possibleBlocks select:[:b | b home isNil].
 
-		possibleBlocks size == 1 ifTrue:[
-		    method := possibleBlocks first method.
-		    "
-		     change the line in the upper-listview
-		     according the information we have now
-		    "
-		    mWho := method who.
-		    ^ '[] (optimized) in ' , 
-		      (mWho at:1) name , '-' , (mWho at:2).
-		].
-	    ]
-	].
+                possibleBlocks size == 1 ifTrue:[
+                    method := possibleBlocks first method.
+                    "
+                     change the line in the upper-listview
+                     according the information we have now
+                    "
+                    mWho := method who.
+                    mWho isNil ifTrue:[
+                        ^ '[] (optimized) in ???'.
+                    ].
+                    ^ '[] (optimized) in ' , 
+                      (mWho at:1) name , '-' , (mWho at:2).
+                ].
+            ]
+        ].
 
-	^ '[] optimized'
+        ^ '[] (optimized)'
     ].
 
     mHome := self methodHome.
     mHome isNil ifTrue:[
-	'BCONTEXT: no methodHome' errorPrintNL.
-	^ '[] in ???'
+        'BCONTEXT: no methodHome' errorPrintNL.
+        ^ '[] in ???'
     ].
 
     "
      kludge to avoid slow search for containing class
     "
     mHome selector == #doIt ifTrue:[
-	who := Array with:mHome receiver class
-		     with:#doIt
+        who := Array with:mHome receiver class
+                     with:#doIt
     ] ifFalse:[
-	m := mHome method.
-	m isNil ifTrue:[
-	    'BCONTEXT: no method' errorPrintNL.
-	    ^ '[] in ???'
-	].
-	who := m who.
+        m := mHome method.
+        m isNil ifTrue:[
+            'BCONTEXT: no method' errorPrintNL.
+            ^ '[] in ???'
+        ].
+        who := m who.
     ].
     who notNil ifTrue:[
-	cls := who at:1
+        cls := who at:1
     ] ifFalse:[
-	cls := receiver class.
+        cls := receiver class.
     ].
     className := cls name.
     className isNil ifTrue:[
-	'BCONTEXT: nameless class' errorPrintNL.
-	className := '???'
+        'BCONTEXT: nameless class' errorPrintNL.
+        className := '???'
     ].
     ^ '[] in ' , className , '-' , mHome selector printString
+
+    "Modified: 29.5.1996 / 13:56:47 / cg"
 ! !
 
 !BlockContext class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/BContext.st,v 1.21 1996-04-25 16:49:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/BContext.st,v 1.22 1996-05-29 13:19:03 cg Exp $'
 ! !
--- a/BlockContext.st	Wed May 29 00:41:19 1996 +0200
+++ b/BlockContext.st	Wed May 29 15:19:03 1996 +0200
@@ -130,86 +130,91 @@
      sender selSender tryVars possibleBlocks method mWho|
 
     (home isNil or:[home isContext not]) ifTrue:[
-	"
-	 mhmh - an optimized blocks context
-	 should get the block here, and get the method from
-	 that one ...
-	 ... but in 2.10.x, there is no easy way to get to the block
-	 since that one is not in the context.
-	 Starting with 2.11, the new block calling scheme will fix this.
-	"
+        "
+         mhmh - an optimized blocks context
+         should get the block here, and get the method from
+         that one ...
+         ... but in 2.10.x, there is no easy way to get to the block
+         since that one is not in the context.
+         Starting with 2.11, the new block calling scheme will fix this.
+        "
 
-	"temporary kludge - peek into the sender context.
-	 If its a do-like method and there is a single block variable 
-	 in the args or temporaries, that must be the one.
-	 This helps in some cases.
-	"
-	(sender := self sender) notNil ifTrue:[
-	    tryVars := false.
-	    (selSender := sender selector) notNil ifTrue:[
-		(selSender endsWith:'do:') ifTrue:[
-		    tryVars := true.
-		] ifFalse:[
-		    (selSender endsWith:'Do:') ifTrue:[
-			tryVars := true.
-		    ]
-		]
-	    ].
-	    tryVars ifTrue:[
-		possibleBlocks := sender argsAndVars select:[:v | v isBlock].
-		possibleBlocks := possibleBlocks select:[:b | b home isNil].
+        "temporary kludge - peek into the sender context.
+         If its a do-like method and there is a single block variable 
+         in the args or temporaries, that must be the one.
+         This helps in some cases.
+        "
+        (sender := self sender) notNil ifTrue:[
+            tryVars := false.
+            (selSender := sender selector) notNil ifTrue:[
+                (selSender endsWith:'do:') ifTrue:[
+                    tryVars := true.
+                ] ifFalse:[
+                    (selSender endsWith:'Do:') ifTrue:[
+                        tryVars := true.
+                    ]
+                ]
+            ].
+            tryVars ifTrue:[
+                possibleBlocks := sender argsAndVars select:[:v | v isBlock].
+                possibleBlocks := possibleBlocks select:[:b | b home isNil].
 
-		possibleBlocks size == 1 ifTrue:[
-		    method := possibleBlocks first method.
-		    "
-		     change the line in the upper-listview
-		     according the information we have now
-		    "
-		    mWho := method who.
-		    ^ '[] (optimized) in ' , 
-		      (mWho at:1) name , '-' , (mWho at:2).
-		].
-	    ]
-	].
+                possibleBlocks size == 1 ifTrue:[
+                    method := possibleBlocks first method.
+                    "
+                     change the line in the upper-listview
+                     according the information we have now
+                    "
+                    mWho := method who.
+                    mWho isNil ifTrue:[
+                        ^ '[] (optimized) in ???'.
+                    ].
+                    ^ '[] (optimized) in ' , 
+                      (mWho at:1) name , '-' , (mWho at:2).
+                ].
+            ]
+        ].
 
-	^ '[] optimized'
+        ^ '[] (optimized)'
     ].
 
     mHome := self methodHome.
     mHome isNil ifTrue:[
-	'BCONTEXT: no methodHome' errorPrintNL.
-	^ '[] in ???'
+        'BCONTEXT: no methodHome' errorPrintNL.
+        ^ '[] in ???'
     ].
 
     "
      kludge to avoid slow search for containing class
     "
     mHome selector == #doIt ifTrue:[
-	who := Array with:mHome receiver class
-		     with:#doIt
+        who := Array with:mHome receiver class
+                     with:#doIt
     ] ifFalse:[
-	m := mHome method.
-	m isNil ifTrue:[
-	    'BCONTEXT: no method' errorPrintNL.
-	    ^ '[] in ???'
-	].
-	who := m who.
+        m := mHome method.
+        m isNil ifTrue:[
+            'BCONTEXT: no method' errorPrintNL.
+            ^ '[] in ???'
+        ].
+        who := m who.
     ].
     who notNil ifTrue:[
-	cls := who at:1
+        cls := who at:1
     ] ifFalse:[
-	cls := receiver class.
+        cls := receiver class.
     ].
     className := cls name.
     className isNil ifTrue:[
-	'BCONTEXT: nameless class' errorPrintNL.
-	className := '???'
+        'BCONTEXT: nameless class' errorPrintNL.
+        className := '???'
     ].
     ^ '[] in ' , className , '-' , mHome selector printString
+
+    "Modified: 29.5.1996 / 13:56:47 / cg"
 ! !
 
 !BlockContext class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/BlockContext.st,v 1.21 1996-04-25 16:49:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/BlockContext.st,v 1.22 1996-05-29 13:19:03 cg Exp $'
 ! !