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

Igor Stasenko siguctua at gmail.com
Wed Jun 29 21:03:34 UTC 2011


On 29 June 2011 22:10, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>
> Hi Igor,
>
> On Wed, Jun 29, 2011 at 10:01 AM, Igor Stasenko <siguctua at gmail.com> wrote:
>>
>> StackToRegisterMapping class>>initializeWithOptions:
>>
>> doesn't have a super send
>> and that's why ProcessorClass class variable is still nil durring call to
>> CogIt class>>ancilliaryStructClasses
>
> This is on purpose.  If you look at buildCodeGeneratorForCogit it initializes each class (Cogit, SimpleStackBasedCogit and StackToRegisterMappingCogit) individually, and that style predates my work on Cog.

Well, i think that this code (logic) better to be placed into class
chain a subclass could initialize things in right order before calling
super initialize etc.
Because code which i seen in build..forCog (forgot the method) which
calls #initializeWithOptions: contains too much bells and whistles as
to me.

>  I'm committing a version which moves the check for regeneration being required to after the building of the code generator and hence initialization has been done.
>
Thanks, i will check tomorrow if issues with initialization is gone.
-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list