BlockContext.st
changeset 293 31df3850e98c
parent 281 d63a7d2c31a6
child 357 82091a50055d
--- a/BlockContext.st	Wed Mar 01 02:42:40 1995 +0100
+++ b/BlockContext.st	Mon Mar 06 20:18:25 1995 +0100
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1993 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/BlockContext.st,v 1.12 1995-02-24 16:32:32 claus Exp $
+$Header: /cvs/stx/stx/libbasic/BlockContext.st,v 1.13 1995-03-06 19:14:53 claus Exp $
 '!
 
 !BlockContext class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/BlockContext.st,v 1.12 1995-02-24 16:32:32 claus Exp $
+$Header: /cvs/stx/stx/libbasic/BlockContext.st,v 1.13 1995-03-06 19:14:53 claus Exp $
 "
 !
 
@@ -140,12 +140,20 @@
 	^ '[] in ???'
     ].
 
-    m := mHome method.
-    m isNil ifTrue:[
-	'BCONTEXT: no method' errorPrintNL.
-	^ '[] in ???'
+    "
+     kludge to avoid slow search for containing class
+    "
+    mHome selector == #doIt ifTrue:[
+	who := Array with:mHome receiver class
+		     with:#doIt
+    ] ifFalse:[
+	m := mHome method.
+	m isNil ifTrue:[
+	    'BCONTEXT: no method' errorPrintNL.
+	    ^ '[] in ???'
+	].
+	who := m who.
     ].
-    who := m who.
     who notNil ifTrue:[
 	cls := who at:1
     ] ifFalse:[