--- a/ObjectMemory.st Fri Apr 11 14:09:19 2014 +0200
+++ b/ObjectMemory.st Fri Apr 11 16:00:49 2014 +0200
@@ -1868,37 +1868,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.
- 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 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
+ ]
+ ]
+ ]
+ ].
].
self error:'no reference' mayProceed:true.
^ nil.
@@ -5550,8 +5553,12 @@
!ObjectMemory class methodsFor:'documentation'!
+version
+ ^ '$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.275 2014-04-11 14:00:49 stefan Exp $'
+!
+
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.274 2014-04-11 12:09:19 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.275 2014-04-11 14:00:49 stefan Exp $'
!
version_SVN