[squeak-dev] The Trunk: Kernel-eem.1188.mcz

Chris Cunningham cunningham.cb at gmail.com
Thu Aug 23 00:19:08 UTC 2018


On Wed, Aug 22, 2018, 15:08 <commits at source.squeak.org> 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)!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180822/cd6b2850/attachment.html>


More information about the Squeak-dev mailing list