But taking a register away from e.g. the calling convention has costs, especially on x86 (6 user registers).
Agree. I can use one register in the environment I'm using, but is not costless (one extra push in methods with block closure instantiations).
But what is selfID? Is that the object table index for self, or something related to self's class or?
selfId is simple the object table index for self.
But the point that I wanted to make was the no overhead when accessing ivars, and the gain in gc
saludos jb
ps: for completeness. When optimizing message send to self, the instance check must be perform (over self and not selfId), as #become: may be sent to self
saludos jb
-- View this message in context: http://forum.world.st/Direct-object-pointers-vs-indirect-ones-pros-and-cons-... Sent from the Squeak VM mailing list archive at Nabble.com.
-- best, Eliot