<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><img size="57025" id="x_img209562" tabindex="0" style="max-width:99.9%" src="cid:084075db-8988-4e49-b34e-36946fb932bf"><br>
</p>
<p><br>
</p>
<p>This is such a small change that I wonder whether we could treat is as a bugfix and include it into the release?</p>
<p><br>
</p>
<p>By the way: The previous bug when debugging OaM was another instance of the debugger chain issue which could be avoided when loading
<a href="http://forum.world.st/I-broke-the-debugger-tp5110752p5111016.html" class="x_OWAAutoLink">
the proposed patch</a>.</p>
<p><br>
</p>
<p>> <span style="font-size:12pt">[1] "The [Objects as Methods] contract is that, when the VM encounters an ordinary object (rather than a compiled method) in the method dictionary during lookup, it sends it the special selector #run:with:in: providing the
 original selector, arguments, and receiver.". DOI: 10.1145/2991041.2991062.</span></p>
<div><br>
</div>
<div><span>I am aware of the fact this is not the best reference for the documentation of VM features. Please feel free to draw my attention to any more official reference of this protocol! :-)</span><br>
</div>
<div><span><br>
</span></div>
<div><span>Best,</span></div>
<div><span>Christoph</span></div>
<p></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><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, 24. Februar 2020 12:55:22<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Inbox: Kernel-ct.1306.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">A new version of Kernel was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Kernel-ct.1306.mcz">http://source.squeak.org/inbox/Kernel-ct.1306.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Kernel-ct.1306<br>
Author: ct<br>
Time: 24 February 2020, 12:55:18.032323 pm<br>
UUID: a5ad7256-3b26-b943-a1f7-ff445738c497<br>
Ancestors: Kernel-mt.1304<br>
<br>
Implement missing simulation of objects as methods.<br>
<br>
In the past, it was not possible to debug/simulate code that used objects as methods properly. (Thanks to Marcel for the hint!) This very simple commit adds support of the OaM protocol [1] to the simulation machinery. Now you can debug all tests in TestObjectsAsMethods
 as you would expect, instead of crashing your image!<br>
<br>
[1] "The [Objects as Methods] contract is that, when the VM encounters an ordinary object (rather than a compiled method) in the method dictionary during lookup, it sends it the special selector #run:with:in: providing the original selector, arguments, and
 receiver.". DOI: 10.1145/2991041.2991062.<br>
<br>
=============== Diff against Kernel-mt.1304 ===============<br>
<br>
Item was changed:<br>
  ----- Method: Context>>send:to:with:lookupIn: (in category 'controlling') -----<br>
  send: selector to: rcvr with: arguments lookupIn: lookupClass<br>
+        "Simulate the action of sending a message with selector and arguments to rcvr. The argument, lookupClass, is the class in which to lookup the message.  This is the receiver's class for normal messages, but for super messages it will be some specific
 class related to the source method."<br>
-        "Simulate the action of sending a message with selector and arguments<br>
-         to rcvr. The argument, lookupClass, is the class in which to lookup the<br>
-         message.  This is the receiver's class for normal messages, but for super<br>
-         messages it will be some specific class related to the source method."<br>
  <br>
         | meth primIndex val ctxt |<br>
         (meth := lookupClass lookupSelector: selector) ifNil:<br>
                 [^self send: #doesNotUnderstand:<br>
                                 to: rcvr<br>
                                 with: {(Message selector: selector arguments: arguments) lookupClass: lookupClass}<br>
                                 lookupIn: lookupClass].<br>
+        meth isCompiledMethod ifFalse: [<br>
+                ^ self send: #run:with:in:<br>
+                        to: meth<br>
+                        with: {selector. arguments. rcvr}].<br>
         meth numArgs ~= arguments size ifTrue:<br>
                 [^self error: 'Wrong number of arguments in simulated message ', selector printString].<br>
         (primIndex := meth primitive) > 0 ifTrue:<br>
                 [val := self doPrimitive: primIndex method: meth receiver: rcvr args: arguments.<br>
                  (self isPrimFailToken: val) ifFalse:<br>
                         [^val]].<br>
         (selector == #doesNotUnderstand: and: [lookupClass == ProtoObject]) ifTrue:<br>
                 [^self error: 'Simulated message ', arguments first selector, ' not understood'].<br>
         ctxt := Context sender: self receiver: rcvr method: meth arguments: arguments.<br>
         primIndex > 0 ifTrue:<br>
                 [ctxt failPrimitiveWith: val].<br>
         ^ctxt!<br>
<br>
<br>
</div>
</span></font>
</body>
</html>