<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        <div class="gmail_default" style="font-family: Arial, Helvetica, sans-serif;font-size: 10pt">> Instead use this pattern:(self objectClass: meth) isCompiledCodeClass</div><div class="gmail_default" style="font-family: Arial, Helvetica, sans-serif;font-size: 10pt"><br></div><div class="gmail_default" style="font-family: Arial, Helvetica, sans-serif;font-size: 10pt">+1</div><div class="gmail_default" style="font-family: Arial, Helvetica, sans-serif;font-size: 10pt"><br></div><div class="gmail_default" style="font-family: Arial, Helvetica, sans-serif;font-size: 10pt">> But do you *really* need to deal with proxies here?  If not, then *please* revert to the simple and rational meth isCompiledCode.</div><div class="gmail_default" style="font-family: Arial, Helvetica, sans-serif;font-size: 10pt"><br></div><div class="gmail_default" style="font-family: Arial, Helvetica, sans-serif;font-size: 10pt">+1</div><div class="gmail_default" style="font-family: Arial, Helvetica, sans-serif;font-size: 10pt"><br></div><div class="gmail_default" style="font-family: Arial, Helvetica, sans-serif;font-size: 10pt">Best,</div><div class="gmail_default" style="font-family: Arial, Helvetica, sans-serif;font-size: 10pt">Marcel</div><div class="mb_sig"></div><blockquote class='history_container' type='cite' style='border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;'>
                        <p style='color: #AAAAAA; margin-top: 10px;'>Am 30.12.2021 20:01:54 schrieb Eliot Miranda <eliot.miranda@gmail.com>:</p><div style='font-family:Arial,Helvetica,sans-serif'>
<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size: 10pt">Hi Christoph,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 28, 2021 at 12:13 PM <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</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">Christoph Thiede uploaded a new version of Kernel to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Kernel-ct.1438.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/Kernel-ct.1438.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Kernel-ct.1438<br>
Author: ct<br>
Time: 28 December 2021, 9:13:10.136249 pm<br>
UUID: 0477e714-e01d-d34d-b6aa-0939494a4abc<br>
Ancestors: Kernel-mt.1437, Kernel-ct.1403<br>
<br>
Merges Kernel-ct.1403 (fixes simulation of dynamic-forwarding objects as methods).<br>
<br>
=============== Diff against Kernel-mt.1437 ===============<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>
<br>
+       | meth methClass primIndex val ctxt |<br>
-       | meth primIndex val ctxt |<br>
        (meth := lookupClass lookupSelector: selector) ifNil:<br>
                [selector == #doesNotUnderstand: ifTrue:<br>
                        [self error: 'Recursive message not understood!!' translated].<br>
                ^self send: #doesNotUnderstand:<br>
                                to: rcvr<br>
                                with: {(Message selector: selector arguments: arguments) lookupClass: lookupClass}<br>
                                lookupIn: lookupClass].<br>
<br>
+       ((methClass := self objectClass: meth) == CompiledMethod or: [methClass == CompiledBlock]) ifFalse:<br></blockquote><div><br></div><div class="gmail_default" style="font-size: 10pt">Again this  cannot be allowed to stand.  It prevents adding subclasses of CompiledMethod & CompiledBlock, which is definitely something one would want to allow.  Instead use this pattern:</div><div class="gmail_default" style="font-size: 10pt"><br></div><div class="gmail_default" style="font-size: 10pt">    (self objectClass: meth) isCompiledCodeClass</div><div class="gmail_default" style="font-size: 10pt"><br></div><div class="gmail_default" style="font-size: 10pt">But do you *really* need to deal with proxies here?  If not, then *please* revert to the simple and rational meth isCompiledCode.</div><div class="gmail_default" style="font-size: 10pt"><br></div><div class="gmail_default" style="font-size: 10pt">Remember you can always have overrides for your own project,  You don't need to inflict these special cases on the community code base (until they're fully justified).  For example, in Virtend (which used to be called Terf) we have several packages we load on top of Squeak 5.3, TerfExtensions-Kernel, TerfExtensions-Collections ,etc.  By organising like this we keep related changes organised by package and we don't have to disturb 5.3.</div><div class="gmail_default" style="font-size: 10pt"><br></div><div class="gmail_default" style="font-size: 10pt"><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">
-       meth isCompiledMethod ifFalse:<br>
                ["Object as Methods (OaM) protocol: 'The 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>
                ^self send: #run:with:in:<br>
                        to: meth<br>
                        with: {selector. arguments. rcvr}].<br>
<br>
        meth numArgs = arguments size ifFalse:<br>
                [^ self error: ('Wrong number of arguments in simulated message {1}' translated format: {selector})].<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>
<br>
        ctxt := self activateMethod: meth withArgs: arguments receiver: rcvr.<br>
        (primIndex isInteger and: [primIndex > 0]) ifTrue:<br>
                [ctxt failPrimitiveWith: val].<br>
<br>
        ^ctxt!<br>
<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size: 10pt;border-collapse: separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div>
</div></blockquote>
                                        </div></body>