The Trunk: Kernel-eem.1188.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Kernel-eem.1188.mcz

commits-2
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1188.mcz

==================== Summary ====================

Name: Kernel-eem.1188
Author: eem
Time: 22 August 2018, 3:07:49.600876 pm
UUID: ecaf5086-5596-4e43-a9f6-82207e9f99d0
Ancestors: Kernel-eem.1187

Use tuples to create the Arrays in a few places.  The bytecode is more compact as well as being quicker.

=============== Diff against Kernel-eem.1187 ===============

Item was changed:
  ----- Method: InstructionStream class>>initialize (in category 'class initialization') -----
  initialize
+ "Initialize an array of special constants returned by single-bytecode returns
+ in the SqueakV3 bytecode set."
- "Initialize an array of special constants returned by single-bytecode returns."
 
+ SpecialConstants := {true. false. nil. -1. 0. 1. 2}
- SpecialConstants :=
- (Array with: true with: false with: nil)
- , (Array with: -1 with: 0 with: 1 with: 2)
  "InstructionStream initialize."
  !

Item was changed:
  ----- Method: Object>>perform: (in category 'message handling') -----
  perform: aSymbol
  "Send the unary selector, aSymbol, to the receiver.
  Fail if the number of arguments expected by the selector is not zero.
  Primitive. Optional. See Object documentation whatIsAPrimitive."
 
  <primitive: 83>
+ ^ self perform: aSymbol withArguments: {}!
- ^ self perform: aSymbol withArguments: (Array new: 0)!

Item was changed:
  ----- Method: Object>>perform:with: (in category 'message handling') -----
  perform: aSymbol with: anObject
  "Send the selector, aSymbol, to the receiver with anObject as its argument.
  Fail if the number of arguments expected by the selector is not one.
  Primitive. Optional. See Object documentation whatIsAPrimitive."
 
  <primitive: 83>
+ ^ self perform: aSymbol withArguments: { anObject }!
- ^ self perform: aSymbol withArguments: (Array with: anObject)!

Item was changed:
  ----- Method: Object>>perform:with:with: (in category 'message handling') -----
  perform: aSymbol with: firstObject with: secondObject
  "Send the selector, aSymbol, to the receiver with the given arguments.
  Fail if the number of arguments expected by the selector is not two.
  Primitive. Optional. See Object documentation whatIsAPrimitive."
 
  <primitive: 83>
+ ^ self perform: aSymbol withArguments: { firstObject. secondObject }!
- ^ self perform: aSymbol withArguments: (Array with: firstObject with: secondObject)!

Item was changed:
  ----- Method: Object>>perform:with:with:with: (in category 'message handling') -----
  perform: aSymbol with: firstObject with: secondObject with: thirdObject
  "Send the selector, aSymbol, to the receiver with the given arguments.
  Fail if the number of arguments expected by the selector is not three.
  Primitive. Optional. See Object documentation whatIsAPrimitive."
 
  <primitive: 83>
+ ^ self perform: aSymbol withArguments: { firstObject. secondObject. thirdObject }!
- ^ self perform: aSymbol
- withArguments: (Array with: firstObject with: secondObject with: thirdObject)!

Item was changed:
  ----- Method: Object>>perform:with:with:with:with: (in category 'message handling') -----
  perform: aSymbol with: firstObject with: secondObject with: thirdObject with: fourthObject
  "Send the selector, aSymbol, to the receiver with the given arguments.
  Fail if the number of arguments expected by the selector is not four.
  Primitive. Optional. See Object documentation whatIsAPrimitive."
 
  <primitive: 83>
+ ^ self perform: aSymbol withArguments: { firstObject. secondObject. thirdObject. fourthObject }!
- ^ self perform: aSymbol
- withArguments: (Array with: firstObject with: secondObject with: thirdObject with: fourthObject)!

Item was changed:
  ----- Method: Object>>perform:with:with:with:with:with: (in category 'message handling') -----
  perform: aSymbol with: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject
  "Send the selector, aSymbol, to the receiver with the given arguments.
  Fail if the number of arguments expected by the selector is not five.
  Primitive. Optional. See Object documentation whatIsAPrimitive."
 
  <primitive: 83>
+ ^ self perform: aSymbol withArguments: { firstObject. secondObject. thirdObject. fourthObject. fifthObject }!
- ^ self perform: aSymbol
- withArguments: (Array with: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject)!


cbc
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-eem.1188.mcz

cbc


On Wed, Aug 22, 2018, 15:08 <[hidden email]> wrote:
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1188.mcz

==================== Summary ====================

Name: Kernel-eem.1188
Author: eem
Time: 22 August 2018, 3:07:49.600876 pm
UUID: ecaf5086-5596-4e43-a9f6-82207e9f99d0
Ancestors: Kernel-eem.1187

Use tuples to create the Arrays in a few places.  The bytecode is more compact as well as being quicker.

=============== Diff against Kernel-eem.1187 ===============

Item was changed:
  ----- Method: InstructionStream class>>initialize (in category 'class initialization') -----
  initialize
+       "Initialize an array of special constants returned by single-bytecode returns
+        in the SqueakV3 bytecode set."
-       "Initialize an array of special constants returned by single-bytecode returns."

+       SpecialConstants := {true. false. nil. -1. 0. 1. 2}
-       SpecialConstants :=
-               (Array with: true with: false with: nil)
-                       , (Array with: -1 with: 0 with: 1 with: 2)     
        "InstructionStream initialize."
  !

Item was changed:
  ----- Method: Object>>perform: (in category 'message handling') -----
  perform: aSymbol
        "Send the unary selector, aSymbol, to the receiver.
        Fail if the number of arguments expected by the selector is not zero.
        Primitive. Optional. See Object documentation whatIsAPrimitive."

        <primitive: 83>
+       ^ self perform: aSymbol withArguments: {}!
-       ^ self perform: aSymbol withArguments: (Array new: 0)!
Is {} faster than #() and more compact? That seems odd. 

Item was changed:
  ----- Method: Object>>perform:with: (in category 'message handling') -----
  perform: aSymbol with: anObject
        "Send the selector, aSymbol, to the receiver with anObject as its argument.
        Fail if the number of arguments expected by the selector is not one.
        Primitive. Optional. See Object documentation whatIsAPrimitive."

        <primitive: 83>
+       ^ self perform: aSymbol withArguments: { anObject }!
-       ^ self perform: aSymbol withArguments: (Array with: anObject)!

Item was changed:
  ----- Method: Object>>perform:with:with: (in category 'message handling') -----
  perform: aSymbol with: firstObject with: secondObject
        "Send the selector, aSymbol, to the receiver with the given arguments.
        Fail if the number of arguments expected by the selector is not two.
        Primitive. Optional. See Object documentation whatIsAPrimitive."

        <primitive: 83>
+       ^ self perform: aSymbol withArguments: { firstObject. secondObject }!
-       ^ self perform: aSymbol withArguments: (Array with: firstObject with: secondObject)!

Item was changed:
  ----- Method: Object>>perform:with:with:with: (in category 'message handling') -----
  perform: aSymbol with: firstObject with: secondObject with: thirdObject
        "Send the selector, aSymbol, to the receiver with the given arguments.
        Fail if the number of arguments expected by the selector is not three.
        Primitive. Optional. See Object documentation whatIsAPrimitive."

        <primitive: 83>
+       ^ self perform: aSymbol withArguments: { firstObject. secondObject. thirdObject }!
-       ^ self perform: aSymbol
-               withArguments: (Array with: firstObject with: secondObject with: thirdObject)!

Item was changed:
  ----- Method: Object>>perform:with:with:with:with: (in category 'message handling') -----
  perform: aSymbol with: firstObject with: secondObject with: thirdObject with: fourthObject
        "Send the selector, aSymbol, to the receiver with the given arguments.
        Fail if the number of arguments expected by the selector is not four.
        Primitive. Optional. See Object documentation whatIsAPrimitive."

        <primitive: 83>
+       ^ self perform: aSymbol withArguments: { firstObject. secondObject. thirdObject. fourthObject }!
-       ^ self perform: aSymbol
-               withArguments: (Array with: firstObject with: secondObject with: thirdObject with: fourthObject)!

Item was changed:
  ----- Method: Object>>perform:with:with:with:with:with: (in category 'message handling') -----
  perform: aSymbol with: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject
        "Send the selector, aSymbol, to the receiver with the given arguments.
        Fail if the number of arguments expected by the selector is not five.
        Primitive. Optional. See Object documentation whatIsAPrimitive."

        <primitive: 83>
+       ^ self perform: aSymbol withArguments: { firstObject. secondObject. thirdObject. fourthObject. fifthObject }!
-       ^ self perform: aSymbol
-               withArguments: (Array with: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject)!