Problem loading ImageFormat

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem loading ImageFormat

Tobias Pape

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
Reply | Threaded
Open this post in threaded view
|

Re: Problem loading ImageFormat

David T. Lewis
 
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' <[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
Reply | Threaded
Open this post in threaded view
|

Re: Problem loading ImageFormat

laza
 
2011/1/8 David T. Lewis <[hidden email]>
Possibly this means that you are the first person to have loaded this package ;)

Hm, not quite. I asked you about this back in October and just four days ago ...

Alex
Reply | Threaded
Open this post in threaded view
|

Re: Problem loading ImageFormat

David T. Lewis
 
On Sat, Jan 08, 2011 at 06:31:25PM +0100, Alexander Lazarevi?? wrote:
>  
> 2011/1/8 David T. Lewis <[hidden email]>
>
> > Possibly this means that you are the first person to have loaded this
> > package ;)
> >
>
> Hm, not quite. I asked you about this back in October and just four days ago
> ...

Alex,

Thank you, and I apologize. I did not see your email, my fault entirely.

Dave

Reply | Threaded
Open this post in threaded view
|

Re: Problem loading ImageFormat

laza
 
No need to apologize. I just stumbled over this and thought I'd let you know.

Alex

2011/1/8 David T. Lewis <[hidden email]>

On Sat, Jan 08, 2011 at 06:31:25PM +0100, Alexander Lazarevi?? wrote:
>
> 2011/1/8 David T. Lewis <[hidden email]>
>
> > Possibly this means that you are the first person to have loaded this
> > package ;)
> >
>
> Hm, not quite. I asked you about this back in October and just four days ago
> ...

Alex,

Thank you, and I apologize. I did not see your email, my fault entirely.

Dave