[Vm-dev] literals in compiled method

Igor Stasenko siguctua at gmail.com
Fri Mar 15 12:43:41 UTC 2013


On 15 March 2013 13:31, Helmut Rohregger <helmut.rohregger at gmail.com> wrote:
>
> Am 15.03.2013 13:18, schrieb Mariano Martinez Peck:
>
>
> On Thu, Mar 14, 2013 at 8:35 PM, Helmut Rohregger <helmut.rohregger at gmail.com> wrote:
>>
>>
>> Hi all
>>
>> maybe someone of you can help me.
>> i am trying to read in a Squeak4.3.image in Java. My question is about the image-format.
>> when i read in a compiled method, there is a object header, then a compiled method header and then some literals. The last 2 literals are always a ByteSymbol (message selector) and an association which contains the class.
>
>
> Not always ;)  For those methods that have primitives/pragmas, the penuntimal literal is an instance of AdditionalMethodState (which contains the selector).
> See (Object>>#class) literals at: 2
>
> ah ok. So this is an AdditionalMethodState which holds the selector and pragmas or properties. Thanks for pointing this out.
>
>
>>
>> I know the address of this association is at 0x1631470 in my image.
>> But the address stored as literal in the compiled method is 0x4801470. This is 0x31D0000 more then expected.
>> Anyone an idea, where this comes from?
>> Or maybe some help, where to look, to discover this?!?
>>
>> thanks
>>
> No idea, why the stored address differs from the real address?
>

are you sure? it should point to some object, that's for sure.


> --
> Mariano
> http://marianopeck.wordpress.com
>
>
> Helmut
>
>



-- 
Best regards,
Igor Stasenko.


More information about the Vm-dev mailing list