dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU] treecc help required


From: James Michael DuPont
Subject: Re: [DotGNU] treecc help required
Date: Thu, 30 Dec 2004 01:21:02 -0800 (PST)

Hi,

I have tried your code,
Looking at the Inst.h generated,
found 
#define SetNext(this__,next) \
        ((*(((struct
            Instruction_vtable__*)((this__)->vtable__))->SetNext_v__))
\
                ((Instruction *)(this__), (next)))

You can just add a typecast to that  :
#define SetNext(this__,next) \
        ((*(((struct Instruction_vtable__
*)((this__)->vtable__))->SetNext_v__)) \
                ((Instruction *)(this__), (Instruction *)(next

that can be added to the treecc generator, but am too lazy to do that.
then you can write :
        //      next = (Instruction*)bbegin;    
        next = SetNext(next,bbegin);


--- Gomi Kapoor <address@hidden> wrote:
>  One major issue which I faced coming with this
>  simple  implementation is casting between 
>  Instruction* and other derived nodes. 
>  I found that casting  between them to be very
> tedious.
>  I feel that I am  doing a basic mistake in using 
>  treecc. Would you  mind commenting on the way I have 
>  (mis)used in the attached  simple implementation.


=====
James Michael DuPont
http://introspector.sourceforge.net/


                
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250


reply via email to

[Prev in Thread] Current Thread [Next in Thread]