[Vm-dev] Changing numArgs of primitive CompiledMethod in Spur

Denis Kudriashov dionisiydk at gmail.com
Sat Feb 27 10:39:38 UTC 2016

Hi Eliot

2016-02-27 0:25 GMT+01:00 Eliot Miranda <eliot.miranda at gmail.com>:

> So the code to change the number of arguments is fine.  What's wrong is
> the code to store the error code.  That comes /after/ the three byte call
> primitive bytecode at the start of the method.  So it should read
> xpc := self initialPC + 3.
> "long store temp"
> (self at: xpc) = 129 ifTrue:
> [self at: xpc + 1 put: (16r40 + numArgs).
> self at: xpc + 3 put: (16r10 + numArgs)]
> Is there any solution to make it working?
> The above should work.  But there's a much easier way

This works. Thank's. I will try your attachment later.

Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160227/9cfb937f/attachment.htm

More information about the Vm-dev mailing list