class: DebugView
authorClaus Gittinger <cg@exept.de>
Wed, 05 Mar 2014 23:20:33 +0100
changeset 14122 c255f0f49ce0
parent 14121 3c8e880471d9
child 14123 7cb688a5249d
class: DebugView changed: #withNodeValueAtInterval:do:
DebugView.st
--- a/DebugView.st	Wed Mar 05 23:20:05 2014 +0100
+++ b/DebugView.st	Wed Mar 05 23:20:33 2014 +0100
@@ -6338,9 +6338,12 @@
 !
 
 withNodeValueAtInterval:interval do:aBlock
-    |node definingNode nm nmBold varIdx parentNode receiver con receiversNonMetaClass|
-
-"/interval printCR.
+    "helper for flyByHelp and explan-selection"
+
+    |node definingNode nm nmBold nameSymbol 
+     varIdx parentNode receiver con receiversNonMetaClass|
+
+    "/ interval printCR.
     Error
         handle:[:ex | ]
         do:[
@@ -6405,13 +6408,16 @@
                 ^ self
             ].
         ].
-        (Smalltalk includesKey:nm asSymbol) ifTrue:[
-            (Smalltalk at:nm asSymbol) isClass ifTrue:[
-                aBlock value:'class: ',nmBold value:nil.
-            ] ifFalse:[
-                aBlock value:(Smalltalk at:nm asSymbol) value:'global ',nmBold.
+        nameSymbol := nm asSymbolIfInterned.
+        nameSymbol notNil ifTrue:[
+            (Smalltalk includesKey:nameSymbol) ifTrue:[
+                (Smalltalk at:nameSymbol) isClass ifTrue:[
+                    aBlock value:'class: ',nmBold value:nil.
+                ] ifFalse:[
+                    aBlock value:(Smalltalk at:nameSymbol) value:'global ',nmBold.
+                ].
+                ^ self
             ].
-            ^ self
         ].
         aBlock value:'' value:'unknown'.
         ^ self
@@ -6452,7 +6458,7 @@
                     aBlock value:(actualContext argAt:varIdx) value:'blockArg ',nmBold .
                     ^ self
                 ].
-aBlock value:nmBold , ' is not in scope of selected context' value:nil.
+                aBlock value:nmBold , ' is not in scope of selected context' value:nil.
                 ^ self
             ]
         ].
@@ -6461,7 +6467,7 @@
     parentNode := definingNode parent.
 
     [parentNode notNil] whileTrue:[
-"/'isMethod ' print. parentNode isMethod printCR.
+        "/'isMethod ' print. parentNode isMethod printCR.
         parentNode isMethod ifTrue:[
             varIdx := parentNode temporaries findFirst:[:var | var name = nm].
             varIdx ~~ 0 ifTrue:[
@@ -6473,13 +6479,13 @@
                 ]
             ].
         ].
-"/'isBlock ' print. parentNode isBlock printCR.
+        "/'isBlock ' print. parentNode isBlock printCR.
         parentNode isBlock ifTrue:[
-            "/ we dont have any information on the inlineability
+            "/ we don't have any information on the inlineability
             "/ of this block here (RBParser does not know what
-            "/ the compiler does.
+            "/ the compiler does).
             "/ therefore, it is questionable if we can use the
-            "/ contexts home context here.
+            "/ context's home context here.
             "/ am I in this block ?
             con := actualContext.
             [con notNil
@@ -9070,15 +9076,15 @@
 !DebugView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.647 2014-03-05 13:41:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.648 2014-03-05 22:20:33 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.647 2014-03-05 13:41:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.648 2014-03-05 22:20:33 cg Exp $'
 !
 
 version_SVN
-    ^ '$Id: DebugView.st,v 1.647 2014-03-05 13:41:07 cg Exp $'
+    ^ '$Id: DebugView.st,v 1.648 2014-03-05 22:20:33 cg Exp $'
 ! !