diff options
author | chelf <chelf@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-06-19 18:40:24 +0000 |
---|---|---|
committer | chelf <chelf@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-06-19 18:40:24 +0000 |
commit | 8036397fb74ba23625cf9d7a50ae46ff7c22e7db (patch) | |
tree | d9713f688255fa9a4493b822900ecc5416c1762d /gcc/c-common.h | |
parent | 438dc50205d471c99c255e04ea9ce85d7f3b29e2 (diff) | |
download | gcc-8036397fb74ba23625cf9d7a50ae46ff7c22e7db.tar.gz |
* c-common.h (IF_COND): Added documentation.
(THEN_CLAUSE): Likewise.
(ELSE_CLAUSE): Likewise.
(WHILE_COND): Likewise.
(WHILE_BODY): Likewise.
(DO_COND): Likewise.
(DO_BODY): Likewise.
(RETURN_EXPR): Likewise.
(EXPR_STMT_EXPR): Likewise.
(FOR_INIT_STMT): Likewise.
(FOR_COND): Likewise.
(FOR_EXPR): Likewise.
(FOR_BODY): Likewise.
(SWITCH_COND): Likewise.
(SWITCH_BODY): Likewise.
(CASE_LOW): Likewise.
(CASE_HIGH): Likewise.
(GOTO_DESTINATION): Likewise.
(COMPOUND_BODY): Likewise.
(ASM_CV_QUAL): Likewise.
(ASM_STRING): Likewise.
(ASM_OUTPUTS): Likewise.
(ASM_INPUTS): Likewise.
(ASM_CLOBBERS): Likewise.
(DECL_STMT_DECL): Likewise.
(STMT_EXPR_STMT): Likewise.
(LABEL_STMT_LABEL): Likewise.
* c-common.def: Added documenetion for SRCLOC, EXPR_STMT,
COMPOUND_STMT, DECL_STMT, IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT,
RETURN_STMT, BREAK_STMT, CONTINUE_STMT, SWITCH_STMT, GOTO_STMT,
LABEL_STMT, ASM_STMT, SCOPE_STMT, CASE_LABEL, STMT_EXPR.
* cp/cp-tree.h (genrtl_try_block): Declare function.
(genrtl_handler): Likewise.
(genrtl_catch_block): Likewise.
(genrtl_ctor_stmt): Likewise.
(genrtl_subobject): Likewise.
(genrtl_decl_cleanup): Likewise.
(genrtl_do_poplevel): Likewise.
(genrtl_do_pushlevel): Likewise.
(genrtl_clear_out_block): Likewise.
(genrtl_goto_stmt): Likewise.
(genrtl_expr_stmt): Likewise.
(genrtl_decl_stmt): Likewise.
(genrtl_if_stmt): Likewise.
(genrtl_while_stmt): Likewise.
(genrtl_do_stmt): Likewise.
(genrtl_return_stmt): Likewise.
(genrtl_for_stmt): Likewise.
(genrtl_break_stmt): Likewise.
(genrtl_continue_stmt): Likewise.
(genrtl_scope_stmt): Likewise.
(genrtl_switch_stmt): Likewise.
(genrtl_case_label): Likewise.
(genrtl_begin_compound_stmt): Likewise.
(genrtl_finish_compound_stmt): Likewise.
(genrtl_compound_stmt): Likewise.
(genrtl_asm_stmt): Likewise.
(genrtl_named_return_value): Likewise.
(genrtl_begin_stmt_expr): Likewise.
(genrtl_finish_stmt_expr): Likewise.
(finish_for_stmt): Removed first argument.
(finish_switch_stmt): Likewise.
* cp/semantics.c (genrtl_try_block): Define function.
(genrtl_handler): Likewise.
(genrtl_catch_block): Likewise.
(genrtl_ctor_stmt): Likewise.
(genrtl_subobject): Likewise.
(genrtl_decl_cleanup): Likewise.
(genrtl_do_poplevel): Likewise.
(genrtl_do_pushlevel): Likewise.
(genrtl_clear_out_block): Likewise.
(genrtl_goto_stmt): Likewise.
(genrtl_expr_stmt): Likewise.
(genrtl_decl_stmt): Likewise.
(genrtl_if_stmt): Likewise.
(genrtl_while_stmt): Likewise.
(genrtl_do_stmt): Likewise.
(genrtl_return_stmt): Likewise.
(genrtl_for_stmt): Likewise.
(genrtl_break_stmt): Likewise.
(genrtl_continue_stmt): Likewise.
(genrtl_scope_stmt): Likewise.
(genrtl_switch_stmt): Likewise.
(genrtl_case_label): Likewise.
(genrtl_begin_compound_stmt): Likewise.
(genrtl_finish_compound_stmt): Likewise.
(genrtl_compound_stmt): Likewise.
(genrtl_asm_stmt): Likewise.
(genrtl_named_return_value): Likewise.
(genrtl_begin_stmt_expr): Likewise.
(genrtl_finish_stmt_expr): Likewise.
(finish_for_stmt): Removed first argument and generate rtl
specific code.
(finish_switch_stmt): Likewise.
(do_poplevel): Removed generate rtl specific code.
(do_pushlevel): Likewise.
(add_tree): Likewise.
(finish_goto_stmt): Likewise.
(finish_expr_stmt): Likewise.
(begin_if_stmt): Likewise.
(finish_if_stmt_cond): Likewise.
(finish_then_clause): Likewise.
(begin_else_clause): Likewise.
(finish_else_clause): Likewise.
(finish_if_stmt): Likewise.
(clear_out_block): Likewise.
(begin_while_stmt): Likewise.
(finish_while_stmt_cond): Likewise.
(finish_while_stmt): Likewise.
(begin_do_stmt): Likewise.
(finish_do_body): Likewise.
(finish_do_stmt): Likewise.
(finish_return_stmt): Likewise.
(begin_for_stmt): Likewise.
(finish_for_init_stmt): Likewise.
(finish_for_cond): Likewise.
(finish_for_expr): Likewise.
(finish_break_stmt): Likewise.
(finish_continue_stmt): Likewise.
(begin_switch_stmt): Likewise.
(finish_switch_cond): Likewise.
(finish_case_label): Likewise.
(begin_try_block): Likewise.
(begin_function_try_block): Likewise.
(finish_try_block): Likewise.
(finish_cleanup_try_block): Likewise.
(finish_cleanup): Likewise.
(finish_function_try_block): Likewise.
(finish_handler_sequence): Likewise.
(finish_function_handler_sequence): Likewise.
(begin_handler): Likewise.
(finish_handler_parms): Likewise.
(begin_catch_block): Likewise.
(finish_handler): Likewise.
(begin_compound_stmt): Likewise.
(finish_compound_stmt): Likewise.
(finish_asm_stmt): Likewise.
(finish_label_stmt): Likewise.
(finish_label_decl): Likewise.
(finish_subobject): Likewise.
(finish_decl_cleanup): Likewise.
(finish_named_return_value): Likewise.
(begin_stmt_expr): Likewise.
(finish_stmt_expr): Likewise.
* cp/decl.c (initialize_local_var): Changed call to finish_expr_stmt
to call genrtl_expr_stmt when appropriate.
* cp/init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
begin_compound_expr to call genrtl_begin_stmt_expr and
genrtl_begin_compound_expr when appropriate.
(finish_init_stmts): Changed calls to finish_compound_expr and
finish_stmt_expr to call genrtl_finish_compound_expr and
genrtl_finish_stmt_expr when appropriate.
(expand_default_init): Changed call to finish_expr_stmt to call
genrtl_expr_stmt when appropriate.
(build_vec_init): Likewise.
* cp/parse.y (simple_stmt): Removed first argument from call to
finish_for_stmt. Removed first argument from call to
finish_switch_stmt.
* cp/parse.c: Regenerated.
* cp/pt.c (tsubst_expr): Removed first argument from call to
finish_for_stmt. Removed first argument from call to
finish_switch_stmt.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34597 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.h')
-rw-r--r-- | gcc/c-common.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h index 81a5127dbf4..cc597a7a989 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -167,32 +167,79 @@ extern tree simple_type_promotes_to PARAMS ((tree)); /* These macros provide convenient access to the various _STMT nodes created when parsing template declarations. */ + +/* IF_STMT accessors. These give access to the condtion of the if + statement, the then block of the if statement, and the else block + of the if stsatement if it exists. */ #define IF_COND(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 0) #define THEN_CLAUSE(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 1) #define ELSE_CLAUSE(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 2) + +/* WHILE_STMT accessors. These give access to the condtion of the + while statement and the body of the while statement, respectively. */ #define WHILE_COND(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 0) #define WHILE_BODY(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 1) + +/* DO_STMT accessors. These give access to the condition of the do + statement and the body of the do statement, respectively. */ #define DO_COND(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 0) #define DO_BODY(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 1) + +/* RETURN_STMT accessor. This gives the expression associated with a + return statement. */ #define RETURN_EXPR(NODE) TREE_OPERAND (RETURN_STMT_CHECK (NODE), 0) + +/* EXPR_STMT accessor. This gives the expression associated with an + expression statement. */ #define EXPR_STMT_EXPR(NODE) TREE_OPERAND (EXPR_STMT_CHECK (NODE), 0) + +/* FOR_STMT accessors. These give access to the init statement, + condition, update expression, and body of the for statement, + respectively. */ #define FOR_INIT_STMT(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 0) #define FOR_COND(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 1) #define FOR_EXPR(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 2) #define FOR_BODY(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 3) + +/* SWITCH_STMT accessors. These give access to the condition and body + of the switch statement, respectively. */ #define SWITCH_COND(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 0) #define SWITCH_BODY(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 1) + +/* CASE_LABEL accessors. These give access to the high and low values + of a case label, respectively. */ #define CASE_LOW(NODE) TREE_OPERAND (CASE_LABEL_CHECK (NODE), 0) #define CASE_HIGH(NODE) TREE_OPERAND (CASE_LABEL_CHECK (NODE), 1) + +/* GOTO_STMT accessor. This gives access to the label associated with + a goto statement. */ #define GOTO_DESTINATION(NODE) TREE_OPERAND (GOTO_STMT_CHECK (NODE), 0) + +/* COMPOUND_STMT accessor. This gives access to the TREE_LIST of + statements assocated with a compound statement. The result is the + first statement in the list. Succeeding nodes can be acccessed by + calling TREE_CHAIN on a node in the list. */ #define COMPOUND_BODY(NODE) TREE_OPERAND (COMPOUND_STMT_CHECK (NODE), 0) + +/* ASM_STMT accessors. ASM_STRING returns a STRING_CST for the + instruction (e.g., "mov x, y"). ASM_OUTPUTS, ASM_INPUTS, and + ASM_CLOBBERS represent the outputs, inputs, and clobbers for the + statement. */ #define ASM_CV_QUAL(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 0) #define ASM_STRING(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 1) #define ASM_OUTPUTS(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 2) #define ASM_INPUTS(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 3) #define ASM_CLOBBERS(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 4) + +/* DECL_STMT accessor. This gives access to the DECL associated with + the given declaration statement. */ #define DECL_STMT_DECL(NODE) TREE_OPERAND (DECL_STMT_CHECK (NODE), 0) + +/* STMT_EXPR accessor. */ #define STMT_EXPR_STMT(NODE) TREE_OPERAND (STMT_EXPR_CHECK (NODE), 0) + +/* LABEL_STMT accessor. This gives access to the label associated with + the given label statement. */ #define LABEL_STMT_LABEL(NODE) TREE_OPERAND (LABEL_STMT_CHECK (NODE), 0) /* Nonzero if this SCOPE_STMT is for the beginning of a scope. */ |