<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>Great, thank both of you! :-)</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> Montag, 19. April 2021 18:38:08<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org; packages@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Trunk: Kernel-nice.1390.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Nicolas Cellier uploaded a new version of Kernel to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Kernel-nice.1390.mcz">http://source.squeak.org/trunk/Kernel-nice.1390.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Kernel-nice.1390<br>
Author: nice<br>
Time: 19 April 2021, 6:37:54.360183 pm<br>
UUID: 3ba56195-f0d4-454c-b3f7-d07e1eadcad7<br>
Ancestors: Kernel-nice.1389<br>
<br>
Fixes regression in Context >> #runSimulated:contextAtEachStep: when the message is sent to something else than thisContext.<br>
<br>
This happens when tallying sends (see MessageTally class >> #tallySendsTo:inBlock:showTree: )<br>
<br>
This commit integrates the change poposed in:<br>
<a href="https://source.squeak.org/treated/Kernel-ct.1363.diff">https://source.squeak.org/treated/Kernel-ct.1363.diff</a><br>
which was a commented version of:<br>
<a href="https://source.squeak.org/treated/Kernel-ct.1362.diff">https://source.squeak.org/treated/Kernel-ct.1362.diff</a><br>
<br>
Thanks Christoph for the fix!<br>
<br>
Also implement #asContextWithSender: in Context so that testRunSimulatedContextAtEachStep continues to work.<br>
 <br>
Thanks Jaromir for the suggestion.<br>
<br>
=============== Diff against Kernel-nice.1389 ===============<br>
<br>
Item was added:<br>
+ ----- Method: Context>>asContextWithSender: (in category 'closure support') -----<br>
+ asContextWithSender: aContext<br>
+        self privSender: aContext.<br>
+        ^ self!<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>
+        "Affect the context stack of the receiver during the simulation of aBlock."<br>
+        current := aBlock asContextWithSender: self.<br>
+        "Insert outer context denoting the end of the simulation."<br>
+        ensure := (ensure := current) insertSender: (Context contextEnsure:<br>
+                [resume := true.<br>
+                ensure privSender: thisContext home sender]).<br>
-        current := aBlock asContext.<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>
+        "Continue with the execution in the previous context."<br>
         ^ current jump!<br>
<br>
<br>
</div>
</span></font>
</body>
</html>