[squeak-dev] CompiledMethod>>#valueWithReceiver:arguments: deprecated implementation?

Eliot Miranda eliot.miranda at gmail.com
Tue Dec 11 23:39:56 UTC 2018


Hi Patrick,

On Tue, Dec 11, 2018 at 7:22 AM <patrick.rein at hpi.uni-potsdam.de> wrote:

> Hi Eliot,
>
> I do not know whether that is of any help but I also noticed that the
> three implementations (Object/ProtoObject and CompiledMethod class) all
> point to primitive 188.
>

That's correct.  The primitive will serve for any of these signatures:

Smalltalk:
[Proto]Object>>withArgs: anArray executeMethod: aCompiledMethod
CompiledMethod class>>receiver: anObject
withArguments: anArray executeMethod: aCompiledMethod

Newspeak:
VMMirror>>ifFail: aBlock object: anObject with: anArray executeMethod:
aCompiledMethod

And the primitive did get updated for Spur so there's no problem with
rewriting CompiledMethod>>#valueWithReceiver:arguments: to use
CompiledMethod class>>receiver:withArguments:executeMethod:.  Do you want
to do it or do you want me to do it?


> Bests
> Patrick
>
> >Hi Patrick,
> >
> >> On Dec 11, 2018, at 6:39 AM, <patrick.rein at hpi.uni-potsdam.de> <
> patrick.rein at hpi.uni-potsdam.de> wrote:
> >>
> >> Hi everyone,
> >>
> >> a while back we discovered the following method with a comment:
> >>
> >> CompiledMethod>>#valueWithReceiver: aReceiver arguments: anArray
> >>    "This should be changed after the release of Squeak 4.3 to
> >>        ^self class receiver: aReceiver withArguments: anArray
> executeMethod: self"
> >>    ^ aReceiver withArgs: anArray executeMethod: self
> >>
> >> Is the comment still valid? Should this be changed? I changed it in my
> image and have not seen any problems. Also the Kernel-Methods tests are
> running fine. Does anyone know more about the comment?
> >
> >I believe it’s my comment.  The point is that a proxy object won’t
> inherit [Proto]Object>>#withArgs:executeMethod: and so sending
> #withArgs:executeMethod: to it won’t do what’s expected at all.  The
> solution is to use a mirror primitive.  So yes, we should indeed make this
> change.  Someone (me?) needs to check that the VM support is there.
> >
> >>
> >> Bests
> >> Patrick
> >
> >Eliot
> >_,,,^..^,,,_ (phone)
> >
>
>

-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20181211/83b844fd/attachment-0001.html>


More information about the Squeak-dev mailing list