Commit 619708cc by Richard Henderson Committed by Richard Henderson

c-decl.c (finish_function): New arg can_defer_p.

        * c-decl.c (finish_function): New arg can_defer_p.  Pass it
        on to c_expand_body.
        * c-tree.h (finish_function): Update decl.
        * c-objc-common.c, c-parse.in, objc/objc-act.c: Update calls.

From-SVN: r51518
parent b1d874d7
2002-03-28 Richard Henderson <rth@redhat.com>
* c-decl.c (finish_function): New arg can_defer_p. Pass it
on to c_expand_body.
* c-tree.h (finish_function): Update decl.
* c-objc-common.c, c-parse.in, objc/objc-act.c: Update calls.
Thu Mar 28 19:13:36 CET 2002 Jan Hubicka <jh@suse.cz> Thu Mar 28 19:13:36 CET 2002 Jan Hubicka <jh@suse.cz>
* ifcvt.c (if_convert): Clear aux_for_blocks early enought. * ifcvt.c (if_convert): Clear aux_for_blocks early enought.
......
...@@ -6687,11 +6687,13 @@ store_parm_decls () ...@@ -6687,11 +6687,13 @@ store_parm_decls ()
This is called after parsing the body of the function definition. This is called after parsing the body of the function definition.
NESTED is nonzero if the function being finished is nested in another. */ NESTED is nonzero if the function being finished is nested in another.
CAN_DEFER_P is nonzero if the function may be deferred. */
void void
finish_function (nested) finish_function (nested, can_defer_p)
int nested; int nested;
int can_defer_p;
{ {
tree fndecl = current_function_decl; tree fndecl = current_function_decl;
...@@ -6760,7 +6762,7 @@ finish_function (nested) ...@@ -6760,7 +6762,7 @@ finish_function (nested)
if (! nested) if (! nested)
{ {
/* Generate RTL for the body of this function. */ /* Generate RTL for the body of this function. */
c_expand_body (fndecl, nested, 1); c_expand_body (fndecl, nested, can_defer_p);
/* Let the error reporting routines know that we're outside a /* Let the error reporting routines know that we're outside a
function. For a nested function, this value is used in function. For a nested function, this value is used in
......
...@@ -326,7 +326,7 @@ finish_cdtor (body) ...@@ -326,7 +326,7 @@ finish_cdtor (body)
RECHAIN_STMTS (body, COMPOUND_BODY (body)); RECHAIN_STMTS (body, COMPOUND_BODY (body));
finish_function (0); finish_function (0, 0);
} }
/* Called at end of parsing, but before end-of-file processing. */ /* Called at end of parsing, but before end-of-file processing. */
......
...@@ -394,7 +394,7 @@ fndef: ...@@ -394,7 +394,7 @@ fndef:
save_filename save_lineno compstmt_or_error save_filename save_lineno compstmt_or_error
{ DECL_SOURCE_FILE (current_function_decl) = $7; { DECL_SOURCE_FILE (current_function_decl) = $7;
DECL_SOURCE_LINE (current_function_decl) = $8; DECL_SOURCE_LINE (current_function_decl) = $8;
finish_function (0); finish_function (0, 1);
POP_DECLSPEC_STACK; } POP_DECLSPEC_STACK; }
| declspecs_ts setspecs declarator error | declspecs_ts setspecs declarator error
{ POP_DECLSPEC_STACK; } { POP_DECLSPEC_STACK; }
...@@ -408,7 +408,7 @@ fndef: ...@@ -408,7 +408,7 @@ fndef:
save_filename save_lineno compstmt_or_error save_filename save_lineno compstmt_or_error
{ DECL_SOURCE_FILE (current_function_decl) = $7; { DECL_SOURCE_FILE (current_function_decl) = $7;
DECL_SOURCE_LINE (current_function_decl) = $8; DECL_SOURCE_LINE (current_function_decl) = $8;
finish_function (0); finish_function (0, 1);
POP_DECLSPEC_STACK; } POP_DECLSPEC_STACK; }
| declspecs_nots setspecs notype_declarator error | declspecs_nots setspecs notype_declarator error
{ POP_DECLSPEC_STACK; } { POP_DECLSPEC_STACK; }
...@@ -422,7 +422,7 @@ fndef: ...@@ -422,7 +422,7 @@ fndef:
save_filename save_lineno compstmt_or_error save_filename save_lineno compstmt_or_error
{ DECL_SOURCE_FILE (current_function_decl) = $6; { DECL_SOURCE_FILE (current_function_decl) = $6;
DECL_SOURCE_LINE (current_function_decl) = $7; DECL_SOURCE_LINE (current_function_decl) = $7;
finish_function (0); finish_function (0, 1);
POP_DECLSPEC_STACK; } POP_DECLSPEC_STACK; }
| setspecs notype_declarator error | setspecs notype_declarator error
{ POP_DECLSPEC_STACK; } { POP_DECLSPEC_STACK; }
...@@ -1586,7 +1586,7 @@ nested_function: ...@@ -1586,7 +1586,7 @@ nested_function:
{ tree decl = current_function_decl; { tree decl = current_function_decl;
DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_FILE (decl) = $5;
DECL_SOURCE_LINE (decl) = $6; DECL_SOURCE_LINE (decl) = $6;
finish_function (1); finish_function (1, 1);
pop_function_context (); pop_function_context ();
add_decl_stmt (decl); } add_decl_stmt (decl); }
; ;
...@@ -1616,7 +1616,7 @@ notype_nested_function: ...@@ -1616,7 +1616,7 @@ notype_nested_function:
{ tree decl = current_function_decl; { tree decl = current_function_decl;
DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_FILE (decl) = $5;
DECL_SOURCE_LINE (decl) = $6; DECL_SOURCE_LINE (decl) = $6;
finish_function (1); finish_function (1, 1);
pop_function_context (); pop_function_context ();
add_decl_stmt (decl); } add_decl_stmt (decl); }
; ;
......
...@@ -192,7 +192,7 @@ extern tree define_label PARAMS ((const char *, int, ...@@ -192,7 +192,7 @@ extern tree define_label PARAMS ((const char *, int,
tree)); tree));
extern void finish_decl PARAMS ((tree, tree, tree)); extern void finish_decl PARAMS ((tree, tree, tree));
extern tree finish_enum PARAMS ((tree, tree, tree)); extern tree finish_enum PARAMS ((tree, tree, tree));
extern void finish_function PARAMS ((int)); extern void finish_function PARAMS ((int, int));
extern tree finish_struct PARAMS ((tree, tree, tree)); extern tree finish_struct PARAMS ((tree, tree, tree));
extern tree get_parm_info PARAMS ((int)); extern tree get_parm_info PARAMS ((int));
extern tree grokfield PARAMS ((const char *, int, tree, tree, tree)); extern tree grokfield PARAMS ((const char *, int, tree, tree, tree));
......
...@@ -1731,7 +1731,7 @@ build_module_descriptor () ...@@ -1731,7 +1731,7 @@ build_module_descriptor ()
c_expand_expr_stmt (decelerator); c_expand_expr_stmt (decelerator);
finish_function (0); finish_function (0, 0);
return XEXP (DECL_RTL (init_function_decl), 0); return XEXP (DECL_RTL (init_function_decl), 0);
} }
...@@ -7265,7 +7265,7 @@ void ...@@ -7265,7 +7265,7 @@ void
finish_method_def () finish_method_def ()
{ {
lang_expand_function_end = objc_expand_function_end; lang_expand_function_end = objc_expand_function_end;
finish_function (0); finish_function (0, 1);
lang_expand_function_end = NULL; lang_expand_function_end = NULL;
/* Required to implement _msgSuper. This must be done AFTER finish_function, /* Required to implement _msgSuper. This must be done AFTER finish_function,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment