[Vm-dev] Re: [Cog] Problems with generating code (initialization of options)

Igor Stasenko siguctua at gmail.com
Wed Jun 29 18:23:28 UTC 2011


On 29 June 2011 20:21, Igor Stasenko <siguctua at gmail.com> wrote:
> i'm still fighting with initialization.
>
> This time is with pool vars.
> The problem is that some pool vars are initialized _after_ being added
> to code generator (which converts them to TDefineNode)
> so, in debugger i was confused (and thought it is some bug of compiler)
> that variable name is
> Byte3ShiftNegated
> and when i print it , it shows -24
> but actual TDefineNode value is nil.
>
> So, what happens is that class pool vars values are read and converted
> into TDefineNode _before_ these vars are properly initialized,
> which of course leads to errors when generating code.
>
> Eliot, could you check the initialization procedure?
>
> Here are image with preloaded vmmaker (its fresh with just loaded packages):
> https://pharo-ic.lille.inria.fr/hudson/view/Cog/job/Cog%20Git%20Tracker%20(sig-cog)/lastSuccessfulBuild/artifact/vmmaker-image.zip
>
> in workspace do:
> StackMacOSConfig generateWithSources
>
> and you will see the error.

oh yeah, i forgot to add, that if you run the same expression second
time it will work ok (since vars are now initialized).
So, its another point of confusion, since i assumed that i fixed that
problem and commited new CMakeVMMaker version..

>
> Or maybe i doing it wrong (using wrong entry point to vmmaker)?
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list