<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Christoph,<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 1, 2021 at 11:07 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_-8933902584813698896divtagdefaultwrapper" 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" dir="ltr">
<p>Hi all,</p>
<p><br>
</p>
<p>please note that primitive 83 is currently crashing the VM (tested with <span>VMMaker.oscog-eem.2850) </span>when called without any arguments, so #<span>testPrimitive83 in the patch below will break the test execution at the moment. However, primitive 84
 works well, so to me this looks like a trivial mistake only.</span></p></div></div></blockquote><div><br></div><div class="gmail_default" style="font-size:small">Hang on.  When would one include primitive 83 in a method that takes no arguments?  Implementing e.g.</div><div class="gmail_default" style="font-size:small">Object>>perform</div><div class="gmail_default" style="font-size:small">    "Invoke the perform primitive with no arguments cuz there's nothing to perform"</div><div class="gmail_default" style="font-size:small">    <primitive: 83></div><div class="gmail_default" style="font-size:small">   self error: 'you don''t say'</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">makes no sense.  IMO the VM isn't obligated to implement checking for nonsensical definitions.  That would slow the VM down unnecessarily.  Instead one should *never* use primitive 843 in a method that takes no arguments.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Hence in your simulation tests you can exclude the case where someone tries tryPrimitive: 83 withArguments: #() because it constitutes undefined behaviour and the VM crashing is IMO to be expected.</div><div class="gmail_default" style="font-size:small"><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_-8933902584813698896divtagdefaultwrapper" 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" dir="ltr">
<div id="gmail-m_-8933902584813698896Signature">
<div id="gmail-m_-8933902584813698896divtagdefaultwrapper" 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_-8933902584813698896Item.MessagePartBody"><br>
</div>
</div>
<div id="gmail-m_-8933902584813698896Item.MessagePartBody">I have (still!) not yet made myself the gift of exploring VMMaker, so I won't be able to fix a patch at the moment. But if someone can solve this, it would be great if you could give me a short pointer to the corresponding
 VMMaker patch because studying small interesting patches appear as a very nice way to explore an unknown framework to me. :-)</div>
<div id="gmail-m_-8933902584813698896Item.MessagePartBody"><br>
</div>
<div id="gmail-m_-8933902584813698896Item.MessagePartBody">Best,</div>
<div id="gmail-m_-8933902584813698896Item.MessagePartBody">Christoph</div>
</div>
</div>
</div>
<br>
<div style="color:rgb(0,0,0)">
<div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-8933902584813698896x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <<a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org" target="_blank">squeak-dev-bounces@lists.squeakfoundation.org</a>> im Auftrag von <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> <<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>><br>
<b>Gesendet:</b> Freitag, 1. Januar 2021 19:59 Uhr<br>
<b>An:</b> <a href="mailto:squeak-dev@lists.squeakfoundation.org" target="_blank">squeak-dev@lists.squeakfoundation.org</a><br>
<b>Betreff:</b> [squeak-dev] The Inbox: KernelTests-ct.382.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt">
<div>Christoph Thiede uploaded a new version of KernelTests to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/KernelTests-ct.382.mcz" id="gmail-m_-8933902584813698896LPlnk931010" target="_blank">http://source.squeak.org/inbox/KernelTests-ct.382.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: KernelTests-ct.382<br>
Author: ct<br>
Time: 1 January 2021, 7:59:13.17819 pm<br>
UUID: 812293dd-db7d-4c03-a33d-8b6f4354d1fa<br>
Ancestors: KernelTests-ct.375, KernelTests-tonyg.381<br>
<br>
Tests simulation of #perform:... primitives 83, 84, and 100. Complements Kernel-ct.1367.<br>
<br>
Depends indeed not only on KernelTests-tonyg.381 but also on KernelTests-ct.375, it would be nice if we could get the latter merged soon, this has already been causing too many merge conflicts in the past. :-)<br>
<br>
=============== Diff against KernelTests-ct.375 ===============<br>
<br>
Item was added:<br>
+ ----- Method: ContextTest>>testPrimitive100 (in category 'tests') -----<br>
+ testPrimitive100<br>
+ <br>
+        {<br>
+                {#isNil. {}. Object}. "valid 0-arg message"<br>
+                {#=. {true}. UndefinedObject}. "valid unary message"<br>
+                {#ifNil:ifNotNil:. {[2]. [:x | x]}. Object}. "valid binary message"<br>
+                {}. "missing selector"<br>
+                {#isNil}. "missing arguments"<br>
+                {#isNil. 'not an array'}. "invalid arguments"<br>
+                {#isNil. {}}. "missing lookupClass"<br>
+                {#isNil. {'excess arg'}. Object}. "too many arguments"<br>
+                {#=. {}. UndefinedObject}. "missing argument"<br>
+                {#isNil. {}. Boolean}. "lookupClass not in inheritance chain"<br>
+        } do: [:args |<br>
+                self<br>
+                        assert: (Context runSimulated: [nil tryPrimitive: 100 withArgs: args])<br>
+                        equals: (nil tryPrimitive: 100 withArgs: args)].!<br>
<br>
Item was added:<br>
+ ----- Method: ContextTest>>testPrimitive83 (in category 'tests') -----<br>
+ testPrimitive83<br>
+ <br>
+        {<br>
+                {#isNil}. "valid 0-arg message"<br>
+                {#=. true}. "valid unary message"<br>
+                {#ifNil:ifNotNil:. [2]. [:x | x]}. "valid binary message"<br>
+                {}. "missing selector"<br>
+                {#isNil. 'excess arg'}. "too many arguments"<br>
+                {#=}. "missing argument"<br>
+        } do: [:args |<br>
+                self<br>
+                        assert: (Context runSimulated: [nil tryPrimitive: 83 withArgs: args])<br>
+                        equals: (nil tryPrimitive: 83 withArgs: args)].!<br>
<br>
Item was added:<br>
+ ----- Method: ContextTest>>testPrimitive84 (in category 'tests') -----<br>
+ testPrimitive84<br>
+ <br>
+        {<br>
+                {#isNil. {}}. "valid 0-arg message"<br>
+                {#=. {true}}. "valid unary message"<br>
+                {#ifNil:ifNotNil:. {[2]. [:x | x]}}. "valid binary message"<br>
+                {}. "missing selector"<br>
+                {#isNil}. "missing arguments"<br>
+                {#isNil. 'not an array'}. "invalid arguments"<br>
+                {#isNil. {'excess arg'}}. "too many arguments"<br>
+                {#=. {}}. "missing argument"<br>
+        } do: [:args |<br>
+                self<br>
+                        assert: (Context runSimulated: [nil tryPrimitive: 84 withArgs: args])<br>
+                        equals: (nil tryPrimitive: 84 withArgs: args)].!<br>
<br>
<br>
</div>
</span></font></div>
</div>
</div>

<br>
</blockquote></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>