This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: function-at-a-time processing in C
- To: chelf at codesourcery dot com
- Subject: Re: function-at-a-time processing in C
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Thu, 15 Jun 00 07:21:31 EDT
- Cc: gcc-patches at gcc dot gnu dot org
--- c-common.def Wed Jun 14 09:52:24 2000
***************
+ DEFTREECODE (EXPR_STMT, "expr_stmt", 'e', 1)
+ DEFTREECODE (COMPOUND_STMT, "compound_stmt", 'e', 1)
+ DEFTREECODE (DECL_STMT, "decl_stmt", 'e', 1)
+ DEFTREECODE (IF_STMT, "if_stmt", 'e', 3)
+ DEFTREECODE (FOR_STMT, "for_stmt", 'e', 4)
+ DEFTREECODE (WHILE_STMT, "while_stmt", 'e', 2)
+ DEFTREECODE (DO_STMT, "do_stmt", 'e', 2)
+ DEFTREECODE (RETURN_STMT, "return_stmt", 'e', 1)
+ DEFTREECODE (BREAK_STMT, "break_stmt", 'e', 0)
+ DEFTREECODE (CONTINUE_STMT, "continue_stmt", 'e', 0)
+ DEFTREECODE (SWITCH_STMT, "switch_stmt", 'e', 2)
+ DEFTREECODE (GOTO_STMT, "goto_stmt", 'e', 1)
+ DEFTREECODE (LABEL_STMT, "label_stmt", 'e', 1)
+ DEFTREECODE (ASM_STMT, "asm_stmt", 'e', 5)
Some documentation on these would help a *tremendous* amount.
But I feel strongly these should be in tree.def, not a new file.
These are not particularly C-specific. They are language-independent.
For example, if we wanted the Ada front end to build a full GCC tree
for a function, it would use these nodes too (I'm not sure if that
would be a useful thing to do or not, but why not make it easier?).