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