[Vm-dev] Problem loading ImageFormat
David T. Lewis
lewis at mail.msen.com
Sat Jan 8 15:26:50 UTC 2011
Oops, thank you. I committed your fix.
Possibly this means that you are the first person to have loaded this package ;)
Dave
On Sat, Jan 08, 2011 at 11:31:04AM +0100, Tobias Pape wrote:
>
> Hello ?
>
> In 'Re: [Vm-dev] About StackInterpreter VM' <20110107035514.GA830 at shell.msen.com>,
> 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
More information about the Vm-dev
mailing list