Hello —
In 'Re: [Vm-dev] About StackInterpreter VM' <
[hidden email]>,
David T Lewis talked about the ImageFormat-Package.
However, without having it loaded previously, it does fail Loading:
MNU on nil with #+.
Reason:
ImageFormat>>#initialize calls
--8<--
initialize
"ImageFormat initialize"
BaseVersionNumbers := self baseVersionNumbers.
BaseVersionMask := self baseVersionMask.
CapabilitiesBitsMask := self capabilitiesBitsMask.
ReservedBitsMask := self reservedBitsMask.
KnownVersionNumbers := self knownVersionNumbers.
PlatformByteOrderBit := 1
-->8--
ImageFormat>>#reservedBitsMask
--8<--
reservedBitsMask
"Bits available for use as capability bits. Reserve high order bit as the
extension bit, to be set true if additional bits are required in the future."
"ImageFormat reservedBitsMask printStringBase: 2"
^(16rFFFFFFFF bitXor: BaseVersionMask)
bitAt: PlatformByteOrderBit put: 0
--8<--
As you can see, PlatformByteOrderBit is referenced before it is set in the
initialize method.
I opt to put the PlatformByteOrderBit-assignment on the top of the initialize method.
So Long
-Tobias