On Thu, May 07, 2009 at 05:06:48PM +0300, Igor Stasenko wrote:
2009/5/7 Andreas Raab andreas.raab@gmx.de:
Second, there is a higher level notion of whether something is compatible or not - for example the return value from certain functions change in a 64 bit image accordingly (I don't even know how a 32 bit plugin is prevented from interacting with a 64 bit image today). Sometimes you really need a high-level bit that tells you that the world has changed even if the names stay the same.
this can be solved simply: add a function with 32 bit value, which could answer is VM 32 bit, or 64 bit.
It's already there. The expression "self bytesPerWord" translates to either 4 or 8 for 32-bit and 64-bit images respectively.
The implementation is in CCodeGenerator>>generateBytesPerWord:on:indent: in VMMaker since VMMaker-dtl.90 on SqS. The change set is on Mantis 7182 if you need to load it into a different VMMaker.
Dave