--- a/ObjectMemory.st Tue Dec 06 07:06:38 2016 +0100
+++ b/ObjectMemory.st Sun Dec 18 11:19:27 2016 +0000
@@ -1996,40 +1996,40 @@
|names oClass|
referent == Smalltalk ifTrue:[
- referent keysAndValuesDo:[:key :val |
- |idx|
-
- (anObject == val) ifTrue:[
- "/ for our convenience - if its a nameSpace, cut off Smalltalk.
- idx := key string indexOf:$:.
- (idx ~~ 0
- and:[idx < key string size
- and:[(key string at:(idx+1)) == $:]]) ifTrue:[
- ^ key allBold "/ (key copyFrom:(idx+2)) allBold
- ].
- ^ 'Smalltalk:' , (key allBold).
- ]
- ].
+ referent keysAndValuesDo:[:key :val |
+ |idx|
+
+ (anObject == val) ifTrue:[
+ "/ for our convenience - if its a nameSpace, cut off Smalltalk.
+ idx := key string indexOf:$:.
+ (idx ~~ 0
+ and:[idx < key string size
+ and:[(key string at:(idx+1)) == $:]]) ifTrue:[
+ ^ key allBold "/ (key copyFrom:(idx+2)) allBold
+ ].
+ ^ 'Smalltalk:' , (key allBold).
+ ]
+ ].
] ifFalse:[
- names := referent class allInstVarNames.
- oClass := referent class.
- oClass == anObject ifTrue:[
- ^ oClass name.
- ].
- 1 to:oClass instSize do:[:i |
- ((referent instVarAt:i) == anObject) ifTrue:[
- ^ '%1 [%2]' bindWith:referent classNameWithArticle with:(names at:i) allBold.
- ].
- ].
- oClass isVariable ifTrue:[
- oClass isPointers ifTrue:[
- 1 to:referent basicSize do:[:i |
- ((referent basicAt:i) == anObject) ifTrue:[
- ^ '%1 [%2] (sz=%2)' bindWith:referent classNameWithArticle with:i printString allBold with:referent basicSize printString
- ]
- ]
- ]
- ].
+ names := referent class allInstVarNames.
+ oClass := referent class.
+ oClass == anObject ifTrue:[
+ ^ oClass name.
+ ].
+ 1 to:oClass instSize do:[:i |
+ ((referent instVarAt:i) == anObject) ifTrue:[
+ ^ '%1 [%2]' bindWith:referent class nameWithArticle with:(names at:i) allBold.
+ ].
+ ].
+ oClass isVariable ifTrue:[
+ oClass isPointers ifTrue:[
+ 1 to:referent basicSize do:[:i |
+ ((referent basicAt:i) == anObject) ifTrue:[
+ ^ '%1 [%2] (sz=%2)' bindWith:referent class nameWithArticle with:i printString allBold with:referent basicSize printString
+ ]
+ ]
+ ]
+ ].
].
self error:'no reference' mayProceed:true.
^ nil.