about mirror primitive and var-arg

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

about mirror primitive and var-arg

Nicolas Cellier
 
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).
Reply | Threaded
Open this post in threaded view
|

Re: about mirror primitive and var-arg

Nicolas Cellier
 


2016-04-29 23:09 GMT+02:00 Nicolas Cellier <[hidden email]>:
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...