package notes

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

package notes

Chris Muller-4
Hi, today I noticed I had a dirty Kernel package in Squeak 5 due to
Grease overrides of three methods.  Squeak has subsequently made
improvements to these methods which may be able to be adopted by
Pharo.  They were changed in 2011 to not create a temporary Array.

   MessageSend>>#value:
   MessageSend>>#value:value:
   MessageSend>>#valueWithPossibleArgs:

All the Grease, JQuery, Javascript and Seaside tests passed with the
modern versions.  The Squeak 5 version of these methods is in the
attached changeset.

Best,
  Chris

_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev

MessageSend-improvements.1.cs.gz (496 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: package notes

Stephan Eggermont-3
On 02-10-15 23:41, Chris Muller wrote:

> Hi, today I noticed I had a dirty Kernel package in Squeak 5 due to
> Grease overrides of three methods.  Squeak has subsequently made
> improvements to these methods which may be able to be adopted by
> Pharo.  They were changed in 2011 to not create a temporary Array.
>
>     MessageSend>>#value:
>     MessageSend>>#value:value:
>     MessageSend>>#valueWithPossibleArgs:
>
> All the Grease, JQuery, Javascript and Seaside tests passed with the
> modern versions.  The Squeak 5 version of these methods is in the
> attached changeset.

Hmm, the do not look very similar to the Pharo ones. Was the temporary
array only created for the case with many arguments?

Stephan

value: anObject

   (receiver class isObsolete) ifTrue: [^ nil].
   (receiver isBehavior and: [receiver isObsolete]) ifTrue: [^ nil].

   ^ receiver
     perform: selector
     with: anObject

value: anObject1 value: anObject2

        ^ receiver
                perform: selector
                with: anObject1
                with: anObject2

valueWithArguments: anArray

        ^ receiver
                perform: selector
                withArguments: (self collectArguments: anArray)

_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev