tree.h (init_function_start): Remove filename and line paramters.

* tree.h (init_function_start): Remove filename and line paramters.
	* function.c (init_function_start): Remove filename and line
	parameters. Use DECL_SOURCE_LOCATION.
	* c-decl.c (store_parm_decls): Adjust init_function_start call.
	(c_expand_body_1): Likewise.
	* coverage.c (create_coverage): Likewise.

	* ada/utils.c (begin_subprog_body): Adjust init_function_start
	call.

	* cp/decl.c (start_function): Adjust init_function_start call.
	* cp/method.c (use_thunk): Likewise.
	* cp/semantics.c (genrtl_start_function): Likewise.

	* f/com.c (stor_parm_decls): Adjust init_function_start call.

	* java/class.c (emit_register_classes): Adjust init_function_start
	call.
	* java/decl.c (complete_start_java_method): Likewise.
	* java/resource.c (write_resource_constructor): Likewise.

	* objc/objc-act.c (build_tmp_function_decl): Set line number to
	zero.
	(hack_method_prototype): Adjust init_function_start call.

	* treelang/treetree.c (tree_code_create_function_initial): Adjust
	init_function_start call.

From-SVN: r67953
This commit is contained in:
Nathan Sidwell 2003-06-14 17:33:32 +00:00 committed by Nathan Sidwell
parent 2fbe6bc2ba
commit ee6b0296b8
20 changed files with 67 additions and 27 deletions

View File

@ -1,3 +1,15 @@
2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
* tree.h (init_function_start): Remove filename and line paramters.
* function.c (init_function_start): Remove filename and line
parameters. Use DECL_SOURCE_LOCATION.
* c-decl.c (store_parm_decls): Adjust init_function_start call.
(c_expand_body_1): Likewise.
* coverage.c (create_coverage): Likewise.
* objc/objc-act.c (build_tmp_function_decl): Set line number to
zero.
(hack_method_prototype): Adjust init_function_start call.
2003-06-14 Richard Earnshaw <rearnsha@arm.com>
PR target/3724

View File

@ -1,3 +1,7 @@
2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
* utils.c (begin_subprog_body): Adjust init_function_start call.
2003-06-14 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in: Update to use options.c and options.h.

View File

@ -1774,7 +1774,7 @@ begin_subprog_body (subprog_decl)
/* Store back the PARM_DECL nodes. They appear in the right order. */
DECL_ARGUMENTS (subprog_decl) = getdecls ();
init_function_start (subprog_decl, input_filename, input_line);
init_function_start (subprog_decl);
expand_function_start (subprog_decl, 0);
/* If this function is `main', emit a call to `__main'

View File

@ -6163,7 +6163,7 @@ store_parm_decls ()
gen_aux_info_record (fndecl, 1, 0, prototype);
/* Initialize the RTL code for the function. */
init_function_start (fndecl, input_filename, input_line);
init_function_start (fndecl);
/* Begin the statement tree for this function. */
begin_stmt_tree (&DECL_SAVED_TREE (current_function_decl));
@ -6422,7 +6422,7 @@ c_expand_body_1 (fndecl, nested_p)
/* Initialize the RTL code for the function. */
current_function_decl = fndecl;
input_location = DECL_SOURCE_LOCATION (fndecl);
init_function_start (fndecl, input_filename, DECL_SOURCE_LINE (fndecl));
init_function_start (fndecl);
/* This function is being processed in whole-function mode. */
cfun->x_whole_function_mode_p = 1;

View File

@ -857,7 +857,7 @@ create_coverage ()
current_function_decl = ctor;
DECL_INITIAL (ctor) = error_mark_node;
make_decl_rtl (ctor, NULL);
init_function_start (ctor, input_filename, input_line);
init_function_start (ctor);
(*lang_hooks.decls.pushlevel) (0);
expand_function_start (ctor, 0);

View File

@ -1,3 +1,9 @@
2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (start_function): Adjust init_function_start call.
* method.c (use_thunk): Likewise.
* semantics.c (genrtl_start_function): Likewise.
2003-06-14 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in: Remove c-options.o.

View File

@ -13471,7 +13471,7 @@ start_function (tree declspecs, tree declarator, tree attrs, int flags)
CFUN set up, and our per-function variables initialized.
FIXME factor out the non-RTL stuff. */
bl = current_binding_level;
init_function_start (decl1, input_filename, input_line);
init_function_start (decl1);
current_binding_level = bl;
/* Even though we're inside a function body, we still don't want to

View File

@ -429,7 +429,7 @@ use_thunk (tree thunk_fndecl, bool emit_p)
DECL_RESULT (thunk_fndecl)
= build_decl (RESULT_DECL, 0, integer_type_node);
fnname = XSTR (XEXP (DECL_RTL (thunk_fndecl), 0), 0);
init_function_start (thunk_fndecl, input_filename, input_line);
init_function_start (thunk_fndecl);
current_function_is_thunk = 1;
assemble_start_function (thunk_fndecl, fnname);

View File

@ -2539,7 +2539,7 @@ genrtl_start_function (fn)
/* Tell everybody what function we're processing. */
current_function_decl = fn;
/* Get the RTL machinery going for this function. */
init_function_start (fn, DECL_SOURCE_FILE (fn), DECL_SOURCE_LINE (fn));
init_function_start (fn);
/* Let everybody know that we're expanding this function, not doing
semantic analysis. */
expanding_p = 1;

View File

@ -1,3 +1,7 @@
Sat Jun 14 18:13:00 2003 Nathan Sidwell <nathan@codesourcery.com>
* com.c (stor_parm_decls): Adjust init_function_start call.
Sat Jun 14 13:25:00 2003 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in: Update to use options.c and options.h.

View File

@ -13884,11 +13884,9 @@ store_parm_decls (int is_main_program UNUSED)
DECL_ARGUMENTS (fndecl) = storedecls (nreverse (getdecls ()));
/* Initialize the RTL code for the function. */
init_function_start (fndecl, input_filename, input_line);
init_function_start (fndecl);
/* Set up parameters and prepare for return, for the function. */
expand_function_start (fndecl, 0);
}

View File

@ -6522,10 +6522,8 @@ init_dummy_function_start ()
of the function. */
void
init_function_start (subr, filename, line)
init_function_start (subr)
tree subr;
const char *filename;
int line;
{
prepare_function_start ();
@ -6541,11 +6539,12 @@ init_function_start (subr, filename, line)
/* Within function body, compute a type's size as soon it is laid out. */
immediate_size_expand++;
/* Prevent ever trying to delete the first instruction of a function.
Also tell final how to output a linenum before the function prologue.
Note linenums could be missing, e.g. when compiling a Java .class file. */
if (line > 0)
emit_line_note (filename, line);
/* Prevent ever trying to delete the first instruction of a
function. Also tell final how to output a linenum before the
function prologue. Note linenums could be missing, e.g. when
compiling a Java .class file. */
if (DECL_SOURCE_LINE (subr))
emit_line_note (DECL_SOURCE_FILE (subr), DECL_SOURCE_LINE (subr));
/* Make sure first insn is a note even if we don't want linenums.
This makes sure the first insn will never be deleted.

View File

@ -1,3 +1,10 @@
2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
* class.c (emit_register_classes): Adjust init_function_start
call.
* decl.c (complete_start_java_method): Likewise.
* resource.c (write_resource_constructor): Likewise.
2003-06-14 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in: Update to use options.c and options.h.

View File

@ -2003,6 +2003,7 @@ emit_register_classes (void)
init_decl = build_decl (FUNCTION_DECL, init_name, init_type);
SET_DECL_ASSEMBLER_NAME (init_decl, init_name);
DECL_SOURCE_LINE (init_decl) = 0;
TREE_STATIC (init_decl) = 1;
current_function_decl = init_decl;
DECL_RESULT (init_decl) = build_decl (RESULT_DECL, NULL_TREE,
@ -2017,7 +2018,7 @@ emit_register_classes (void)
pushlevel (0);
make_decl_rtl (init_decl, NULL);
init_function_start (init_decl, input_filename, 0);
init_function_start (init_decl);
expand_function_start (init_decl, 0);
/* Do not allow the function to be deferred. */

View File

@ -1670,7 +1670,7 @@ complete_start_java_method (tree fndecl)
if (! flag_emit_class_files)
{
/* Initialize the RTL code for the function. */
init_function_start (fndecl, input_filename, input_line);
init_function_start (fndecl);
/* Set up parameters and prepare for return, for the function. */
expand_function_start (fndecl, 0);

View File

@ -113,6 +113,7 @@ write_resource_constructor (void)
init_type = build_function_type (void_type_node, end_params_node);
init_decl = build_decl (FUNCTION_DECL, init_name, init_type);
DECL_SOURCE_LINE (init_decl) = 0;
SET_DECL_ASSEMBLER_NAME (init_decl, init_name);
TREE_STATIC (init_decl) = 1;
current_function_decl = init_decl;
@ -125,7 +126,7 @@ write_resource_constructor (void)
pushlevel (0);
make_decl_rtl (init_decl, NULL);
init_function_start (init_decl, input_filename, 0);
init_function_start (init_decl);
expand_function_start (init_decl, 0);
/* Write out entries in the same order in which they were defined. */

View File

@ -2932,7 +2932,8 @@ build_tmp_function_decl ()
{
tree decl_specs, expr_decl, parms;
char buffer[80];
tree tmp_decl;
/* struct objc_object *objc_xxx (id, SEL, ...); */
pushlevel (0);
decl_specs = build_tree_list (NULL_TREE, objc_object_reference);
@ -2956,7 +2957,10 @@ build_tmp_function_decl ()
expr_decl = build_nt (CALL_EXPR, get_identifier (buffer), parms, NULL_TREE);
expr_decl = build1 (INDIRECT_REF, NULL_TREE, expr_decl);
return define_decl (expr_decl, decl_specs);
tmp_decl = define_decl (expr_decl, decl_specs);
DECL_SOURCE_LINE (tmp_decl) = 0;
return tmp_decl;
}
/* Generate the prototypes for protocol methods. This is used to
@ -3007,7 +3011,7 @@ hack_method_prototype (nst_methods, tmp_decl)
for (parm = DECL_ARGUMENTS (tmp_decl); parm; parm = TREE_CHAIN (parm))
DECL_CONTEXT (parm) = tmp_decl;
init_function_start (tmp_decl, "objc-act", 0);
init_function_start (tmp_decl);
/* Typically called from expand_function_start for function definitions. */
assign_parms (tmp_decl);

View File

@ -2829,7 +2829,7 @@ extern void expand_main_function PARAMS ((void));
extern void init_dummy_function_start PARAMS ((void));
extern void expand_dummy_function_end PARAMS ((void));
extern void init_function_for_compilation PARAMS ((void));
extern void init_function_start PARAMS ((tree, const char *, int));
extern void init_function_start PARAMS ((tree));
extern void assign_parms PARAMS ((tree));
extern void put_var_into_stack PARAMS ((tree, int));
extern void flush_addressof PARAMS ((tree));

View File

@ -1,3 +1,8 @@
2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
* treetree.c (tree_code_create_function_initial): Adjust
init_function_start call.
2003-06-14 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in: Update to use options.c and options.h.

View File

@ -382,8 +382,7 @@ tree_code_create_function_initial (tree prev_saved,
execute this? */
make_decl_rtl (fn_decl, NULL);
/* Use filename/lineno from above. */
init_function_start (fn_decl, loc.file, loc.line);
init_function_start (fn_decl);
/* Create rtl for startup code of function, such as saving registers. */