<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Oh, thank you for merging, Eliot! Meanwhile, I almost had forgotten these fixes myself ... ;-)</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">
<div class="x__rp_U4 x_ms-font-weight-regular x_ms-font-color-neutralDark x_rpHighlightAllClass x_rpHighlightBodyClass" id="x_Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="x_divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="x_Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont">
<div><font size="3" color="black"><span style="font-size:12pt"><a href="http://www.hpi.de/" target="_blank" rel="noopener noreferrer" id="LPNoLP"><font size="2"><span id="LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von commits@source.squeak.org <commits@source.squeak.org><br>
<b>Gesendet:</b> Dienstag, 22. September 2020 20:15:43<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org; packages@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Trunk: Tools-ct.987.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Eliot Miranda uploaded a new version of Tools to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Tools-ct.987.mcz">http://source.squeak.org/trunk/Tools-ct.987.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Tools-ct.987<br>
Author: ct<br>
Time: 3 September 2020, 2:45:32.786083 pm<br>
UUID: e07c870e-186e-f54a-9dbc-b766b1cb2bbb<br>
Ancestors: Tools-ct.985<br>
<br>
Fixes several issues with accepting source in debuggers. Applies overall refactoring to Debugger>>#contents:notifying:.<br>
<br>
With this version, two concrete regressions are fixed that were introduced with the SistaV1 bytecode set (see [1]):<br>
- When compiling a method from a block context and answering subsequent parser notifications, make sure the source code is not lost. A variant of this issue was filed by Eliot (emm) in [2].<br>
- When removing a method from a block context, make sure the stack is unwinded correctly.<br>
<br>
Further adjustments:<br>
- Don't restart the current context if a different selector is changed.<br>
- Update contentsSelection correctly without morphic hack. Works now in MVC, again.<br>
<br>
[1] <a href="http://forum.world.st/The-Inbox-Kernel-dtl-1310-mcz-td5113032.html">
http://forum.world.st/The-Inbox-Kernel-dtl-1310-mcz-td5113032.html</a><br>
[2] <a href="http://forum.world.st/tedious-programming-in-the-debugger-error-needs-fixing-td5109568.html">
http://forum.world.st/tedious-programming-in-the-debugger-error-needs-fixing-td5109568.html</a><br>
<br>
=============== Diff against Tools-ct.985 ===============<br>
<br>
Item was changed:<br>
  ----- Method: Debugger>>contents:notifying: (in category 'accessing') -----<br>
  contents: aText notifying: aController<br>
+        "Accept new method source of the selected context."<br>
-        "The retrieved information has changed and its source must now be updated.<br>
-         In this case, the retrieved information is the method of the selected context."<br>
-        | result selector classOfMethod category h ctxt newMethod |<br>
-        contextStackIndex = 0 ifTrue:<br>
-                [^false].<br>
-        self selectedContext isExecutingBlock ifTrue:<br>
-                [h := self selectedContext activeHome.<br>
-                 h ifNil:<br>
-                        [self inform: 'Method for block not found on stack, can''t edit and continue'.<br>
-                         ^false].<br>
-                 (self confirm: 'I will have to revert to the method from\which this block originated.  Is that OK?' withCRs) ifFalse:<br>
-                        [^false].<br>
-                self resetContext: h changeContents: false.<br>
-                "N.B. Only reset the contents if the compilation succeeds.  If contents are reset<br>
-                 when compilation fails both compiler error message and modifications are lost."<br>
-                (result := self contents: aText notifying: aController) ifTrue:<br>
-                        [self contentsChanged].<br>
-                ^result].<br>
  <br>
+        | selector classOfMethod category ctxt newMethod |<br>
+        contextStackIndex = 0 ifTrue: [^ false].<br>
+        <br>
+        "First, handle some edge cases"<br>
+        selector := self selectedClass newParser parseSelector: aText.<br>
+        "selector isDoIt ifTrue: [<br>
+                currentCompiledMethod := self compileDoIt: aText]."<br>
+        self flag: #todo. "ct: Recompile doIt method *without* creating method litters!! See Compiler>>#evaluateCue:ifFail:."<br>
+        selector = self selectedMessageName ifFalse: [<br>
+                "Different message compiled, delegating to super"<br>
+                ^ super contents: aText notifying: aController].<br>
+        <br>
+        self selectedContext isExecutingBlock ifTrue: [<br>
+                "If we are in a block context, we need to rewind the stack before ."<br>
+                | home |<br>
+                home := self selectedContext activeHome.<br>
+                home ifNil: [<br>
+                        self inform: 'Method for block not found on stack, can''t edit and continue' translated.<br>
+                        ^ false].<br>
+                (self confirm: 'I will have to revert to the method from\which this block originated. Is that OK?' withCRs translated) ifFalse: [<br>
+                        ^ false].<br>
+                <br>
+                self resetContext: home changeContents: false.<br>
+                "N.B. Only reset the contents if the compilation succeeds. If contents would be reset when compilation fails, both compiler error message and modifications were lost."<br>
+                ^ (self contents: aText notifying: aController)<br>
+                        ifTrue: [self contentsChanged];<br>
+                        yourself].<br>
+        <br>
         classOfMethod := self selectedClass.<br>
         category := self selectedMessageCategoryName.<br>
+        <br>
+        "Do the actual compilation"<br>
-        selector := self selectedClass newParser parseSelector: aText.<br>
-        (selector == self selectedMessageName<br>
-         or: [(self selectedMessageName beginsWith: 'DoIt')<br>
-                and: [selector numArgs = self selectedMessageName numArgs]]) ifFalse:<br>
-                [self inform: 'can''t change selector'.<br>
-                 ^false].<br>
         selector := classOfMethod<br>
+                compile: aText<br>
+                classified: category<br>
+                notifying: aController.<br>
+        selector ifNil: [^ false]. "compilation cancelled"<br>
+        <br>
+        "Update views"<br>
-                                compile: aText<br>
-                                classified: category<br>
-                                notifying: aController.<br>
-        selector ifNil: [^false]. "compile cancelled"<br>
         contents := aText.<br>
         newMethod := classOfMethod compiledMethodAt: selector.<br>
+        newMethod isQuick ifTrue: [<br>
+                self cutBackExecutionToSenderContext].<br>
-        newMethod isQuick ifTrue:<br>
-                [self cutBackExecutionToSenderContext].<br>
         ctxt := interruptedProcess popTo: self selectedContext.<br>
         ctxt == self selectedContext<br>
+                ifFalse: [self inform: 'Method saved, but current context unchanged\because of unwind error. Click OK to see error' withCRs translated]<br>
+                ifTrue: [<br>
+                        newMethod isQuick ifFalse: [<br>
+                                interruptedProcess restartTopWith: newMethod.<br>
+                                self stepToStatement].<br>
-                ifFalse:<br>
-                        [self inform: 'Method saved, but current context unchanged\because of unwind error. Click OK to see error' withCRs]<br>
-                ifTrue:<br>
-                        [newMethod isQuick ifFalse:<br>
-                                [interruptedProcess<br>
-                                        restartTopWith: newMethod;<br>
-                                  stepToSendOrReturn].<br>
                         contextVariablesInspector object: nil].<br>
         self resetContext: ctxt.<br>
+        <br>
+        Project current addDeferredUIMessage: [<br>
+                self changed: #contentsSelection].<br>
+        ^ true!<br>
-        Smalltalk isMorphic ifTrue:<br>
-                [Project current world<br>
-                        addAlarm: #changed:<br>
-                        withArguments: #(contentsSelection)<br>
-                        for: self<br>
-                        at: (Time millisecondClockValue + 200)].<br>
-        ^true!<br>
<br>
Item was changed:<br>
  ----- Method: Debugger>>contextStackIndex:oldContextWas: (in category 'private') -----<br>
  contextStackIndex: anInteger oldContextWas: oldContext <br>
         "Change the context stack index to anInteger, perhaps in response to user selection."<br>
  <br>
         | isNewMethod |<br>
         self saveReceiverInspectorState.<br>
         self saveContextVariablesInspectorState.<br>
         contextStackIndex := anInteger.<br>
         anInteger = 0 ifTrue:<br>
                 [currentCompiledMethod := contents := nil.<br>
                  self changed: #contextStackIndex.<br>
                  self decorateButtons.<br>
                  self contentsChanged.<br>
                  contextVariablesInspector object: nil.<br>
                  receiverInspector context: nil; inspect: self receiver.<br>
                  ^self].<br>
         isNewMethod := oldContext isNil<br>
+                or: [oldContext home method ~= (currentCompiledMethod := self selectedContext home method)].<br>
-                or: [oldContext method ~~ (currentCompiledMethod := self selectedContext method)].<br>
         isNewMethod ifTrue:<br>
                 [contents := self selectedMessage.<br>
                  self contentsChanged.<br>
                  self pcRange].<br>
         self changed: #contextStackIndex.<br>
         self decorateButtons.<br>
         contextVariablesInspector object: self selectedContext.<br>
         self restoreContextVariablesInspectorState.<br>
         receiverInspector context: self selectedContext; inspect: self receiver.<br>
         self restoreReceiverInspectorState.<br>
         isNewMethod ifFalse:<br>
                 [self changed: #contentsSelection]!<br>
<br>
Item was changed:<br>
  ----- Method: Debugger>>findCleanHomeBelow: (in category 'context stack (message list)') -----<br>
  findCleanHomeBelow: method<br>
  <br>
         | dirtyIndex |<br>
         dirtyIndex := contextStack size + 1.<br>
         contextStack reverse detect: [:context |<br>
                 dirtyIndex := dirtyIndex - 1.<br>
+                context home method = method homeMethod].<br>
-                context method = method].<br>
         ^ dirtyIndex + 1!<br>
<br>
Item was added:<br>
+ ----- Method: Debugger>>tallyMenu: (in category 'controls') -----<br>
+ tallyMenu: aMenu<br>
+ <br>
+        ^ aMenu<br>
+                "title: 'Tally' translated;" flag: #todo; "ct: Implement on PluggableMenuSpec"<br>
+                addTranslatedList: #(<br>
+                        ('Tally selection'      tallyIt 'evaluate current selection and measure the time')<br>
+                        ('Record send'  doRecord 'record next message send'));<br>
+                yourself!<br>
<br>
<br>
</div>
</span></font>
</body>
</html>