[squeak-dev] LittleSmalltalk and loading od 2004 .pr
K K Subbu
kksubbu.ml at gmail.com
Sun Jul 1 10:51:01 UTC 2018
On Saturday 30 June 2018 03:14 AM, David T. Lewis wrote:
> Squeak images are saved with the native byte ordering of the machine
> from which they were saved (https://en.wikipedia.org/wiki/Endianness).
> I believe that this is true of image segments also.
Projects files use VM-specific encoding, so they can't be used across
different types of VM :-(
From
http://forum.world.st/4-6-5-0-how-to-help-users-manage-different-formats-td4811303.html#a4811856
----
An ImageSegment is a WordArray whose contents are a sequence of heap
objects in the VM's native object format. A segment is loaded by
invoking a primitive that swizzles the pointers in the word array so
that they become valid objects, and then shortening the word array,
leaving the objects behind in memory. Since the contents of the
WordArray are specific to a given VM architecture one cannot use the
primitive loading mechanism to load segments from VMs with different
object representations.
----
I am confused with the first statement. segment in ImageSegment is byte
indexed and ByteArray has support for endian read/writes. Is there any
reason why WordArray was used instead of ByteArray?
HTH .. Subbu
More information about the Squeak-dev
mailing list
|