[Vm-dev] InterpreterProxy and big-endian simulation

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Apr 5 22:19:32 UTC 2016


Hi,
I now need to use byteSwapped32IfBigEndian: in LargeIntegersPlugin in order
to support 32bits digit on hypothetical bigEndian machines.

This message will be replaced with a macro during C code generation, so
it's only a problem for simulation.

My first idea was to delegate to interpreterProxy.
Alas, the interpreterProxy is not associated to an objectMemory (or more
exactly a simulator of objectMemory)

I'm not very satisfied with InterpreterProxy>>vmEndianness
It will use the image endianness instead of the simulator endianness...
With this, I would be able to simulate littleEndian (most VM/Images are),
but I won't be able to simulate bigEndian...

Augmenting InterpreterProxy with proper knowledge of ObjectMemory simulator
is above my skills...
There are 18 class refs, and it does not seems like it has been designed
for such support.

Alternatively, I could implement byteSwapped32IfBigEndian: in
LargeIntegersPlugin.
There even is a simulator inst. var. in smart plugins.
Alas, this simulator inst. var. is filled with a SmartSyntaxPluginSimulator
which also is completely unware of objectMemory...

Any idea how I could support big-endian simulation properly?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160406/ba6bdb1d/attachment.htm


More information about the Vm-dev mailing list