tree.h (init_function_start): Remove filename and line paramters.
authorNathan Sidwell <nathan@codesourcery.com>
Sat, 14 Jun 2003 17:33:32 +0000 (17:33 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Sat, 14 Jun 2003 17:33:32 +0000 (17:33 +0000)
* 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

20 files changed:
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/utils.c
gcc/c-decl.c
gcc/coverage.c
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/method.c
gcc/cp/semantics.c
gcc/f/ChangeLog
gcc/f/com.c
gcc/function.c
gcc/java/ChangeLog
gcc/java/class.c
gcc/java/decl.c
gcc/java/resource.c
gcc/objc/objc-act.c
gcc/tree.h
gcc/treelang/ChangeLog
gcc/treelang/treetree.c

index 480e734e86f1b9d843403d95d48d8f6384910a01..dc46038be07d9ee6b0a050ea9e98a2a5878c4440 100644 (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
index a0bdb474d8bc664e4105792bf22449441dea6047..740f535e0c7d5539481fe90af98185cc1568f7ec 100644 (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.
index a88c9a3219b9571381d78bab665e6e78d75d3f83..5eeca2b68285081c240be8c262c98fb62fa34203 100644 (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'
index ae921d06100c53333f0f3ae6fb7f991b43ffa39e..cc818d861d0aab0754ca28668cf45638869c25db 100644 (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;
index 9f33b811605e7beeb4531389264368e3345a1160..49cf14a26893aea8295298c2705bc8141cb54944 100644 (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);
 
index 8713ac966b3d5a5225505037d270be71a1d0779a..11c73b9b786a7cd9c2ee83abdb376b60c6c1b822 100644 (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.
index f318551e25c97dbfb293c09b3d2a4a757e68733c..454e1ef901e7fa4d57d8d94bd3116b64b77c93ca 100644 (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
index 51af020f385d4691c827bd7c584d94816fcdc5f7..ef801aceb19fd3d5332afaa67a10bee7b16d8c3b 100644 (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);
 
index 646cc19d525228aedbd1b541ae78dc0b5ae161e4..31f942424378b1167edeea0e27f73e73019e66b1 100644 (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;
index e6667f4695e489a61c6c942caf5fe622c85bf874..ab62160ad137a6c664f9c1360302880ab74fd292 100644 (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.
index 6750fc32f209ae58cf508057bbdd8c8649aea4b0..aec7ce33722dcda0ec22f0fa5f2fad6705fd30dd 100644 (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);
 }
 
index e59bf6a954c59f8b9ab4c357e116873837c5042b..84cfd6ede27d19cb81e07e0ebc38e40cfd443c47 100644 (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.
index 88bc7fe44dd37d66491931e55a4bb8db385e53c5..0fdaa9dd890d9e80e032a7d541b0aa42e00d2e74 100644 (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.
index a7fa45442ef54146e97f718310c4ae77e7016ca6..fe00f78f9a36bda76f24af81d52b6dcdf8157e10 100644 (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.  */
index b06cf88249bf564f5115ad0084428938ff8a51bd..7d5507cd8ed71117caea99492d63e44b52250f69 100644 (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);
index 9e2b2434008c3a3142348193b45b09f5449c7572..a1de225c6080aaf6560b78ee14e44e82e60e2918 100644 (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.  */
index cf74c8d700ab6fafca5c54b93d7d1752435ab36f..3a654e6ed13ef85c036a21bcf028bd2aa8df381d 100644 (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);
index f40ddbe9be07275f8e330559658949075c8d5ac6..51d0f2c5d540b915c7207446a35d1856f186343e 100644 (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));
index 710f468de2a66098c18c65733992cb2aa1e496bf..73c502ba168aa2b1d69c4c6d4171d86b86a14983 100644 (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.
index 40db190851709779a1d4685a9dbabb4417e2c905..bbc0c3fa66db0c933355907e1c73e722c065a13a 100644 (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.  */