<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>Thank you for the simplification, Eliot! (I would also have done this myself as written in the other thread, but anyway, now it's fixed.) :-)</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
</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> Sonntag, 6. Februar 2022 22:06:45<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org; packages@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Trunk: Kernel-eem.1444.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Eliot Miranda uploaded a new version of Kernel to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Kernel-eem.1444.mcz">http://source.squeak.org/trunk/Kernel-eem.1444.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Kernel-eem.1444<br>
Author: eem<br>
Time: 6 February 2022, 1:06:19.372648 pm<br>
UUID: fcc28469-65a2-463c-aafe-34de0816a2c2<br>
Ancestors: Kernel-mt.1443<br>
<br>
Fi Context>>send:to:with:lookupIn:.  The contract for object-as-method is not that the VM expects instances of CompiledBlock and CompiledMethod, but any general instance of CompiledCode.  So implement isCompiledCodeClass and use this on the class of the method.<br>
<br>
Tiny speedup/simplification for MessageSend class>>#receiver:selector:argument:<br>
<br>
=============== Diff against Kernel-mt.1443 ===============<br>
<br>
Item was added:<br>
+ ----- Method: CompiledCode class>>isCompiledCodeClass (in category 'testing') -----<br>
+ isCompiledCodeClass<br>
+        ^true!<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 primIndex val ctxt |<br>
-        | meth methClass 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>
+        (self objectClass: meth) isCompiledCodeClass ifFalse:<br>
-        ((methClass := self objectClass: meth) == CompiledMethod or: [methClass == CompiledBlock]) 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>
Item was changed:<br>
  ----- Method: MessageSend class>>receiver:selector:argument: (in category 'instance creation') -----<br>
  receiver: anObject selector: aSymbol argument: aParameter<br>
+        ^self receiver: anObject selector: aSymbol arguments: { aParameter }!<br>
-        ^ self receiver: anObject selector: aSymbol arguments: (Array with: aParameter)!<br>
<br>
Item was added:<br>
+ ----- Method: Object>>isCompiledCodeClass (in category 'testing') -----<br>
+ isCompiledCodeClass<br>
+        ^false!<br>
<br>
<br>
</div>
</span></font>
</body>
</html>