<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 22, 2018, 15:08  <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Eliot Miranda uploaded a new version of Kernel to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Kernel-eem.1188.mcz" rel="noreferrer noreferrer" target="_blank">http://source.squeak.org/trunk/Kernel-eem.1188.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Kernel-eem.1188<br>
Author: eem<br>
Time: 22 August 2018, 3:07:49.600876 pm<br>
UUID: ecaf5086-5596-4e43-a9f6-82207e9f99d0<br>
Ancestors: Kernel-eem.1187<br>
<br>
Use tuples to create the Arrays in a few places.  The bytecode is more compact as well as being quicker.<br>
<br>
=============== Diff against Kernel-eem.1187 ===============<br>
<br>
Item was changed:<br>
  ----- Method: InstructionStream class>>initialize (in category 'class initialization') -----<br>
  initialize<br>
+       "Initialize an array of special constants returned by single-bytecode returns<br>
+        in the SqueakV3 bytecode set."<br>
-       "Initialize an array of special constants returned by single-bytecode returns."<br>
<br>
+       SpecialConstants := {true. false. nil. -1. 0. 1. 2}<br>
-       SpecialConstants := <br>
-               (Array with: true with: false with: nil)<br>
-                       , (Array with: -1 with: 0 with: 1 with: 2)      <br>
        "InstructionStream initialize."<br>
  !<br>
<br>
Item was changed:<br>
  ----- Method: Object>>perform: (in category 'message handling') -----<br>
  perform: aSymbol <br>
        "Send the unary selector, aSymbol, to the receiver.<br>
        Fail if the number of arguments expected by the selector is not zero.<br>
        Primitive. Optional. See Object documentation whatIsAPrimitive."<br>
<br>
        <primitive: 83><br>
+       ^ self perform: aSymbol withArguments: {}!<br>
-       ^ self perform: aSymbol withArguments: (Array new: 0)!<br></blockquote></div></div><div dir="auto">Is {} faster than #() and more compact? That seems odd. </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Item was changed:<br>
  ----- Method: Object>>perform:with: (in category 'message handling') -----<br>
  perform: aSymbol with: anObject <br>
        "Send the selector, aSymbol, to the receiver with anObject as its argument.<br>
        Fail if the number of arguments expected by the selector is not one.<br>
        Primitive. Optional. See Object documentation whatIsAPrimitive."<br>
<br>
        <primitive: 83><br>
+       ^ self perform: aSymbol withArguments: { anObject }!<br>
-       ^ self perform: aSymbol withArguments: (Array with: anObject)!<br>
<br>
Item was changed:<br>
  ----- Method: Object>>perform:with:with: (in category 'message handling') -----<br>
  perform: aSymbol with: firstObject with: secondObject <br>
        "Send the selector, aSymbol, to the receiver with the given arguments.<br>
        Fail if the number of arguments expected by the selector is not two.<br>
        Primitive. Optional. See Object documentation whatIsAPrimitive."<br>
<br>
        <primitive: 83><br>
+       ^ self perform: aSymbol withArguments: { firstObject. secondObject }!<br>
-       ^ self perform: aSymbol withArguments: (Array with: firstObject with: secondObject)!<br>
<br>
Item was changed:<br>
  ----- Method: Object>>perform:with:with:with: (in category 'message handling') -----<br>
  perform: aSymbol with: firstObject with: secondObject with: thirdObject <br>
        "Send the selector, aSymbol, to the receiver with the given arguments.<br>
        Fail if the number of arguments expected by the selector is not three.<br>
        Primitive. Optional. See Object documentation whatIsAPrimitive."<br>
<br>
        <primitive: 83><br>
+       ^ self perform: aSymbol withArguments: { firstObject. secondObject. thirdObject }!<br>
-       ^ self perform: aSymbol<br>
-               withArguments: (Array with: firstObject with: secondObject with: thirdObject)!<br>
<br>
Item was changed:<br>
  ----- Method: Object>>perform:with:with:with:with: (in category 'message handling') -----<br>
  perform: aSymbol with: firstObject with: secondObject with: thirdObject with: fourthObject<br>
        "Send the selector, aSymbol, to the receiver with the given arguments.<br>
        Fail if the number of arguments expected by the selector is not four.<br>
        Primitive. Optional. See Object documentation whatIsAPrimitive."<br>
<br>
        <primitive: 83><br>
+       ^ self perform: aSymbol withArguments: { firstObject. secondObject. thirdObject. fourthObject }!<br>
-       ^ self perform: aSymbol<br>
-               withArguments: (Array with: firstObject with: secondObject with: thirdObject with: fourthObject)!<br>
<br>
Item was changed:<br>
  ----- Method: Object>>perform:with:with:with:with:with: (in category 'message handling') -----<br>
  perform: aSymbol with: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject<br>
        "Send the selector, aSymbol, to the receiver with the given arguments.<br>
        Fail if the number of arguments expected by the selector is not five.<br>
        Primitive. Optional. See Object documentation whatIsAPrimitive."<br>
<br>
        <primitive: 83><br>
+       ^ self perform: aSymbol withArguments: { firstObject. secondObject. thirdObject. fourthObject. fifthObject }!<br>
-       ^ self perform: aSymbol<br>
-               withArguments: (Array with: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject)!<br>
<br>
<br>
</blockquote></div></div></div>