<div dir="ltr"><div dir="ltr">Hi Christophe, Hi Tobias,<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Sep 5, 2020 at 4:10 AM Thiede, Christoph <<a href="mailto:Christoph.Thiede@student.hpi.uni-potsdam.de">Christoph.Thiede@student.hpi.uni-potsdam.de</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">




<div dir="ltr">
<div id="gmail-m_-3938398495572026058divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p>Hi all, hi Eliot,</p>
<p><br>
</p>
<p>just for curiosity, I have two new questions <span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">about the VM machinery</span> (which
 are far away from praxis but close to my interests):</p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt"><b>1.</b></span><span style="font-size:12pt"><b> super on ProtoObject</b></span></p>
<p><span style="font-size:12pt">What would you expect the following to return?</span></p>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<p><span style="font-size:12pt"></span></p>
<div>x := Compiler evaluate: 'super identityHash' for: ProtoObject new.</div>
<p></p>
<p><span style="font-size:12pt"></span></p>
<div>thisContext objectClass: x.</div>
<p></p>
</blockquote>
<p><span style="font-size:12pt"></span></p>
<div></div>
I would have guessed that either the VM crashes or ProtoObject >> #<span>cannotInterpret: is called.</span></div></div></blockquote><div><br></div><div>My guess before looking at the code was that the send provoked a doesNotUnderstand: and hence the expression returned the result of raising a MessageNotUnderstood exception.  But looking at the code I see that at least in the JIT there is undefined behavior in looking up a message in a nil class (the superclass of ProtoObject is nil).  So thank you for this.  I'll have to firm up the behaviour to ensure a doesNotUnderstand: is the result.</div><div><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"><div dir="ltr"><div id="gmail-m_-3938398495572026058divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p></p>
<div id="gmail-m_-3938398495572026058Signature">
<div id="gmail-m_-3938398495572026058divtagdefaultwrapper" 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="divtagdefaultwrapper">
<div>
<div id="gmail-m_-3938398495572026058Item.MessagePartBody">But actually, it answers you the ProtoObject instance, which I find very interesting because it means that if a message cannot be looked up, it is simply and silently skipped.</div></div></div></div></div></div></div></blockquote><div><br></div><div>Which is a bug.  The only reasonable thing to do here (IMO) is for the VM to send doesNotUnderstnnd:.</div><div> </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"><div dir="ltr"><div id="gmail-m_-3938398495572026058divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr"><div id="gmail-m_-3938398495572026058Signature"><div id="gmail-m_-3938398495572026058divtagdefaultwrapper" 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="divtagdefaultwrapper"><div><div id="gmail-m_-3938398495572026058Item.MessagePartBody">
<div id="gmail-m_-3938398495572026058Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="gmail-m_-3938398495572026058divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="gmail-m_-3938398495572026058Signature">
<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/" rel="noopener noreferrer" id="gmail-m_-3938398495572026058LPNoLP" target="_blank"><font size="2"><span id="gmail-m_-3938398495572026058LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</font></div>
</div>
</font></div>
</div>
</div>
</div>
<div id="gmail-m_-3938398495572026058Item.MessagePartBody">If you debug the call instead (Context class >> #runSimulated:), <span>Context >> #send:to:with:lookupIn: raises a nil DNU error, which makes more sense but unfortunately is not consistent with the original VM behavior.</span></div>
<div id="gmail-m_-3938398495572026058Item.MessagePartBody"><span>Maybe the Compiler should forbid any call to super from ProtoObject instances at all (more formally: if the receiver's class's superclass is nil)? Or should we adjust the simulation code?</span></div>
<div id="gmail-m_-3938398495572026058Item.MessagePartBody"><span>(By the way: If you do the same in Squeak.js, you'll get an infinite recursion :D)</span></div>
<div id="gmail-m_-3938398495572026058Item.MessagePartBody"><span><br>
</span></div>
<div id="gmail-m_-3938398495572026058Item.MessagePartBody"><span><b>2. Mirror primitives</b></span></div>
<div id="gmail-m_-3938398495572026058Item.MessagePartBody"><span>What is the reason for primitives such as 75 (#identityHash) or 78/139 (#nextInstance/#nextObject) not being mirrored in Context?</span></div>
<div id="gmail-m_-3938398495572026058Item.MessagePartBody"><span>Was this simply forgotten, or don't we have the claim to mirror any "essential" primitive without it actually being needed by the simulation machinery?</span></div></div></div></div></div></div></div></blockquote><div><br></div><div>They're not needed by the execution simulation machinery.</div><div> </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"><div dir="ltr"><div id="gmail-m_-3938398495572026058divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr"><div id="gmail-m_-3938398495572026058Signature"><div id="gmail-m_-3938398495572026058divtagdefaultwrapper" 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="divtagdefaultwrapper"><div>
<div id="gmail-m_-3938398495572026058Item.MessagePartBody"><span style="font-size:12pt">As always, looking forward to your interesting explanations! :-)</span><span style="font-family:Arial,Helvetica,sans-serif;font-size:small;color:rgb(34,34,34)"> </span></div></div></div></div></div></div></div></blockquote><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"><div dir="ltr"><div id="gmail-m_-3938398495572026058divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr"><div id="gmail-m_-3938398495572026058Signature"><div id="gmail-m_-3938398495572026058divtagdefaultwrapper" 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="divtagdefaultwrapper"><div><div id="gmail-m_-3938398495572026058Item.MessagePartBody"><br></div>
<div id="gmail-m_-3938398495572026058Item.MessagePartBody"><span><br>
</span></div>
<div id="gmail-m_-3938398495572026058Item.MessagePartBody"><span>Best,</span></div>
<div id="gmail-m_-3938398495572026058Item.MessagePartBody"><span>Christoph</span></div></div></div></div></div></div></div></blockquote><div><br></div><div>Cheers </div></div><div><br></div><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>