<div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:large">Hi Christoph,<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 3, 2020 at 1:29 PM <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">A new version of Kernel was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Kernel-ct.1362.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/Kernel-ct.1362.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Kernel-ct.1362<br>
Author: ct<br>
Time: 3 November 2020, 10:29:21.488637 pm<br>
UUID: 48a3e4c2-8aa8-414e-8d36-ccfe076c6aab<br>
Ancestors: Kernel-eem.1361<br>
<br>
Fixes regression in Context >> #runSimulated:contextAtEachStep: when the message is sent to something else than thisContext.<br>
<br>
=============== Diff against Kernel-eem.1361 ===============<br>
<br>
Item was changed:<br>
  ----- Method: Context>>runSimulated:contextAtEachStep: (in category 'system simulation') -----<br>
  runSimulated: aBlock contextAtEachStep: anotherBlock<br>
        "Simulate the execution of the argument, aBlock, until it ends or is curtailed. If any exception is signaled during the execution, simulate it being handled on the present caller stack. Evaluate anotherBlock with the current context prior to each instruction executed. Answer the simulated value of aBlock."<br>
<br>
        | current resume ensure |<br>
        resume := false.<br>
        current := aBlock asContext.<br>
+       current privSender: self.<br>
+       ensure := current insertSender: (Context contextEnsure:<br>
+               [resume := true.<br>
+               ensure privSender: thisContext home sender]).<br>
-       ensure := current insertSender: (Context contextEnsure: [resume := true]).<br>
-       ensure sender ifNil: [ensure privSender: self]. "For backward compatibility, do not fail if aBlock is dead."<br>
<br>
        (anotherBlock numArgs = 0<br>
                ifTrue: ["optimized" [resume]]<br>
                ifFalse: ["stop execution on time, don't expose simulation details to caller"<br>
                        [current == ensure or: <br>
                                ["Context >> #resume:"<br>
                                current size >= 2 and: <br>
                                        [(current at: 2) == ensure]]]   ])<br>
                whileFalse:<br>
                        [anotherBlock cull: current.<br>
                        current := current step].<br>
<br>
        ^ current jump!<br></blockquote><div><font face="arial, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, sans-serif">Please add as expansive a comment as you see fit in front of those new lines beginning "current privSender: self".  It's important and non-obvious.  I think only by peppering this method with comments will we develop the correct version that can both answer results and hide the existence of <span style="color:rgb(0,0,0)">runSimulated:contextAtEachStep: from the simulation.  Once it's working as we see fit we can prune the comments, but right now we need to be discursive and explanatory with each other.  Go forth and be prolix :-)</span></font></div></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div></div>