--- a/BlockContext.st Fri Jul 20 14:32:04 2012 +0100
+++ b/BlockContext.st Wed Jul 25 09:45:15 2012 +0100
@@ -114,17 +114,13 @@
"Created: / 5.3.1998 / 16:20:31 / stefan"
!
-isBlockContext
- "return true, iff the receiver is a BlockContext, false otherwise"
-
- ^ true
-!
-
method
"return the method in which the current contexts block was created."
home notNil ifTrue:[^ home method].
- ^ nil
+ ^ super method
+
+ "Modified: / 19-07-2012 / 10:58:55 / cg"
!
methodHome
@@ -189,10 +185,11 @@
in the args or temporaries, that must be the one.
This helps in some cases.
"
+ m := self method.
m isNil ifTrue:[
^ '[] (optimized) in ???'.
].
- ^ '[] (optimized) in ' , m mclass name , ' >> ' , m selector.
+ ^ '[] in ' , m mclass name , ' >> ' , m selector.
].
mHome := self methodHome.
@@ -235,17 +232,38 @@
].
^ '[] in ' , className , ' >> ' , sel
- "Modified: 10.1.1997 / 21:26:21 / cg"
+ "Modified: / 19-07-2012 / 11:02:41 / cg"
+! !
+
+!BlockContext methodsFor:'testing'!
+
+isBlockContext
+ "return true, iff the receiver is a BlockContext, false otherwise"
+
+ ^ true
+!
+
+isCheapBlockContext
+ "return true, iff the receiver is a BlockContext, for a cheap block, false otherwise.
+ Cheap blocks do not refer to their home"
+
+ ^ home isNil
+
+ "Created: / 19-07-2012 / 11:22:23 / cg"
! !
!BlockContext class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/BlockContext.st,v 1.33 2008/11/05 14:22:16 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/BlockContext.st,v 1.35 2012/07/19 09:24:00 cg Exp $'
+!
+
+version_CVS
+ ^ '§Header: /cvs/stx/stx/libbasic/BlockContext.st,v 1.35 2012/07/19 09:24:00 cg Exp §'
!
version_SVN
- ^ '$Id: BlockContext.st 10761 2012-01-19 11:46:00Z vranyj1 $'
+ ^ '$Id: BlockContext.st 10829 2012-07-25 08:45:15Z vranyj1 $'
! !