[Vm-dev] Re: about mirror primitive and var-arg

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sat Apr 30 20:06:34 UTC 2016


2016-04-29 23:09 GMT+02:00 Nicolas Cellier <
nicolas.cellier.aka.nice at gmail.com>:

> Hi,
> in initializePrimitiveTableForSqueak,
> I wonder why (111 genPrimitiveClass) has no specification of number of
> args when (110 genPrimitiveIdentical 1) has...
>
> They are both used by miror primitives ain't they?
> Should it be (110 genPrimitiveIdentica) instead?
>
> Same for (62 genPrimitiveSize 0) and (169 genPrimitiveNotIdentical 1).
>

Ah, maybe because genPrimitiveIdentical always use the ReceiverResultReg
which would not be correct for mirror primitive.
It is then better for the mirror to fallback to executing primitive: 110.

Generally, mirror primitives are used exceptionally (debugging), so it's
maybe not worth complexifying often used code for not so often used case.
Or we would need different primitive numbers for both...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160430/2d1b80b9/attachment.htm


More information about the Vm-dev mailing list