Context.st
changeset 23543 170b00be0103
parent 23512 9a8d8399e566
child 23647 a6c73965eae8
--- a/Context.st	Thu Nov 22 15:50:52 2018 +0100
+++ b/Context.st	Fri Nov 23 15:11:36 2018 +0100
@@ -1698,31 +1698,33 @@
      * However, these print methods are also invoked for low-level pointer errors, so better be prepared...
      */
     if (__isNonNilObject(someObject) && (__qClass(someObject)==nil)) {
-	s = __MKSTRING("FreeObject");
+        RETURN(@symbol(FreeObject));
     }
 #endif /* not SCHTEAM */
 %}.
-    s isNil ifTrue:[
-	s := someObject displayString.
-	s isNil ifTrue:[
-	    ^ '**************** nil displayString of ',(someObject class name ? '??')
-	].
+    someObject isProtoObject ifTrue:[
+        "take care, do not evaluate lazy or do sends to
+         a bridge when showing backtrace. Especially not after
+         timeout of a bridge call!!"
+        s := someObject class nameWithArticle.
+    ] ifFalse:[
+        s := someObject displayString.
     ].
-"/    JV@2013-04-26: Following is rubbish, the callers must handle string output correctly.
-"/    moreover storeString does not work on self-referencing structures, but that doesn't matter
-"/    for wide strings.
-"/    SV@2013-08-19: I checked/fixed the callers to use CharacterWriteStreams.
-"/    s isWideString ifTrue:[
-"/        "make sure that the object really returns something we can stream into a string"
-"/        s := someObject storeString.
-"/    ].
-    ^ s
+    s isNil ifTrue:[
+        ^ '**************** nil displayString of ',(someObject class name ? '??').
+    ].
+    ^ s string.
+
+    "Modified: / 23-11-2018 / 15:07:34 / Stefan Vogel"
 !
 
 argsDisplayString
-    ^ String streamContents:[:s | self displayArgsOn:s ].
+    ^ String streamContents:[:s | 
+        self displayArgsOn:s withCRs:false indent:0 contractEachTo:100
+    ].
 
     "Modified (format): / 07-03-2012 / 13:11:17 / cg"
+    "Modified: / 23-11-2018 / 14:41:51 / Stefan Vogel"
 !
 
 argsDisplayStringShort
@@ -1733,12 +1735,6 @@
     "Modified (format): / 07-03-2012 / 13:11:17 / cg"
 !
 
-displayArgsOn:aStream
-    self displayArgsOn:aStream withCRs:false indent:0 contractEachTo:100
-
-    "Modified: / 15-03-2017 / 14:13:38 / cg"
-!
-
 displayArgsOn:aStream withCRs:withCRs indent:i
     self displayArgsOn:aStream withCRs:withCRs indent:i contractEachTo:100
 !
@@ -1759,7 +1755,7 @@
         ].
 
         aStream spaces:i.
-        aStream nextPutAll:s asString string.
+        aStream nextPutAll:s.
         withCRs ifTrue:[
             aStream cr.
         ] ifFalse:[    
@@ -1768,6 +1764,7 @@
     ].
 
     "Created: / 15-03-2017 / 14:13:33 / cg"
+    "Modified: / 23-11-2018 / 12:27:43 / Stefan Vogel"
 !
 
 displayLocalsOn:aStream withCRs:withCRs indent:i
@@ -1783,7 +1780,7 @@
             s := s contractTo:100.
         ].
         aStream spaces:i.
-        aStream nextPutAll:s asString string.
+        aStream nextPutAll:s.
         withCRs ifTrue:[
             aStream cr
         ] ifFalse:[    
@@ -1792,14 +1789,15 @@
     ].
 
     "Created: / 15-03-2017 / 14:13:23 / cg"
+    "Modified: / 23-11-2018 / 12:27:28 / Stefan Vogel"
 !
 
 displayOn:aGCOrStream
     "return a string to display the receiver - for display in Inspector"
 
-    "/ what a kludge - Dolphin and Squeak mean: printOn: a stream;
-    "/ old ST80 means: draw-yourself on a GC.
     (aGCOrStream isStream) ifFalse:[
+        "/ what a kludge - Dolphin and Squeak mean: printOn: a stream;
+        "/ old ST80 means: draw-yourself on a GC.
         ^ super displayOn:aGCOrStream
     ].
 
@@ -1810,6 +1808,7 @@
     aGCOrStream nextPut:$).
 
     "Modified (comment): / 22-02-2017 / 16:47:42 / cg"
+    "Modified (comment): / 23-11-2018 / 14:46:56 / Stefan Vogel"
 !
 
 fullPrintAllOn:aStream
@@ -1861,15 +1860,17 @@
 !
 
 fullPrintAllOn:aStream throughContextForWhich:aBlock
-    "print a full walkback (incl arguments) starting at the receiver"
+    "print a full walkback (inclusive arguments) starting at the receiver"
 
     self withSendersThroughContextForWhich:aBlock do:[:con |
-        con fullPrintOn:aStream. aStream cr.
+        con fullPrintOn:aStream withVariables:false. aStream cr.
     ].
 
     "
      thisContext fullPrintAllOn:Transcript throughContextForWhich:[:con | con selector == #doIt].
     "
+
+    "Modified (comment): / 23-11-2018 / 12:21:11 / Stefan Vogel"
 !
 
 fullPrintAllOn:aStream upToContextForWhich:aBlock
@@ -1937,7 +1938,7 @@
     withVariables ifFalse:[
         self size ~~ 0 ifTrue: [
             aStream space.
-            self displayArgsOn:aStream
+            self displayArgsOn:aStream withCRs:false indent:0.
         ].
     ].
     aStream nextPutAll:' {'.
@@ -1966,6 +1967,7 @@
     "
 
     "Created: / 15-03-2017 / 13:24:16 / cg"
+    "Modified: / 23-11-2018 / 14:44:28 / Stefan Vogel"
 !
 
 fullPrintString