This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to add a new operand to an expression?

In message <>, Carlo Wood writes:
 >On Thu, Oct 09, 2003 at 11:16:49AM -0400, Diego Novillo wrote:
 >> On Thu, 2003-10-09 at 11:05, Carlo Wood wrote:
 >> > Can you be more specific?  I see nothing in make_node that
 >> > seems to need adjustment, gives me a clue or is even related
 >> > to CALL_EXPR :/.
 >> You may have missed the call to tree_size inside make_node.  From the
 >> debug dump you sent, it seems that you're losing track of how much
 >> memory was allocated to CALL_EXPR.  You'll have to debug from there.
 >tree_size() is automatically returning the correct size
 >after updating tree.def, of course.
 >tree_size() returns:
 >      return (sizeof (struct tree_exp)
 >	      + TREE_CODE_LENGTH (code) * sizeof (char *) - sizeof (char *));
 >The TREE_CODE_LENGTH is changed as a result of
 >changing the tree.def.
 >I am still clueless of why it doesn't work
 >the way I am doing this.
Well, you also have to find all the places that call "build" to build
nodes of the  specified type and have them pass in an additional argument.  
Otherwise the additional arguments get garbage off the stack.  See 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]