<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Calibri Light";
        panose-1:2 15 3 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
        {mso-style-priority:1;
        margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Juan,</p>
<p class="MsoNormal">Here’s a fix of a nasty bug in Context Part>>contextEnsure:</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It shows while debugging or stepping; try this sequence that would get you right before the bug:</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">p _ [ContextPart contextEnsure: [42]] newProcess.</p>
<p class="MsoNormal">[p suspendedContext selectorToSendOrSelf = #jump] whileFalse: [p step].</p>
<p class="MsoNormal">[p suspendedContext selectorToSendOrSelf = #privSender:] whileFalse: [p step].</p>
<p class="MsoNormal">3 timesRepeat: [p stepToCallee].</p>
<p class="MsoNormal">p step.</p>
<p class="MsoNormal">p suspendedContext explore.</p>
<p class="MsoNormal">p suspendedContext method inspect.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Please notice that the suspendedContext only has stackp=2 and hence the next instruction will fail in the next step:</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">p step</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The root cause is contextEnsure: mistakenly treats ctxt as a top context (i.e. one that has a return value already at the top of the stack); the fix is trivial: add a fake return value – see enclosed.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best,</p>
<p class="MsoNoSpacing"><span lang="CS">--</span></p>
<p class="MsoNoSpacing"><strong><span style="font-family:"Calibri Light",sans-serif;color:#333333;font-weight:normal">Jaromír Matas</span></strong><span style="font-family:"Calibri Light",sans-serif;color:#555555"><o:p></o:p></span></p>
<p class="MsoNoSpacing"><span style="font-family:"Calibri Light",sans-serif;color:#2E75B6">mail@jaromir.net<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#8FAADC"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>