<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>>     <span style="font-size: 12pt;">x := Compiler evaluate: 'super identityHash' for: ProtoObject new.</span></p>
<div>>     <span style="font-size: 12pt;">thisContext objectClass: x.</span></div>
<div><br>
</div>
<p></p>
<p><span style="font-size: 12pt;">Also interesting:</span><br>
</p>
<p>'super bar' returns a DNU where the receiver is a SmallInteger (sic!). In a second image, the call is skipped, again ...</p>
<div id="Signature">
<div id="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="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont"></font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Thiede, Christoph<br>
<b>Gesendet:</b> Samstag, 5. September 2020 13:10:29<br>
<b>An:</b> Squeak Dev<br>
<b>Betreff:</b> [squeak-dev] Two new questions about VM machinery :-)</font>
<div> </div>
</div>
<div>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;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: 0 0 0 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>
<p></p>
<div id="Signature">
<div id="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="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="_rp_T4" id="Item.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 class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="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 class="_rp_T4" id="Item.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 class="_rp_T4" id="Item.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 class="_rp_T4" id="Item.MessagePartBody"><span>(By the way: If you do the same in Squeak.js, you'll get an infinite recursion :D)</span></div>
<div class="_rp_T4" id="Item.MessagePartBody"><span><br>
</span></div>
<div class="_rp_T4" id="Item.MessagePartBody"><span><b>2. Mirror primitives</b></span></div>
<div class="_rp_T4" id="Item.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 class="_rp_T4" id="Item.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 class="_rp_T4" id="Item.MessagePartBody"><span><br>
</span></div>
<div class="_rp_T4" id="Item.MessagePartBody"><span>As always, looking forward to your interesting explanations! :-)</span></div>
<div class="_rp_T4" id="Item.MessagePartBody"><span><br>
</span></div>
<div class="_rp_T4" id="Item.MessagePartBody"><span>Best,</span></div>
<div class="_rp_T4" id="Item.MessagePartBody"><span>Christoph</span></div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>