tree-inline.c (expand_call_inline): DECL_SOURCE_LINE_FIRST is removed.
authorNathan Sidwell <nathan@codesourcery.com>
Mon, 9 Jun 2003 12:57:15 +0000 (12:57 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Mon, 9 Jun 2003 12:57:15 +0000 (12:57 +0000)
* tree-inline.c (expand_call_inline): DECL_SOURCE_LINE_FIRST is
removed.
* java/java-tree.h (DECL_FUNCTION_LAST_LINE): New.
(struct lang_decl_func): Add last_line field.
* java/parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
DECL_SOURCE_LINE_LAST): Remove.
* java/parse.y (missing_return_error,
finish_method_declaration, lookup_cl, start_artificial_method_body,
source_end_java_method, start_complete_expand_method): Adjust.

From-SVN: r67661

gcc/ChangeLog
gcc/java/ChangeLog
gcc/java/java-tree.h
gcc/java/parse.h
gcc/java/parse.y
gcc/tree-inline.c

index 84b3d6e22da3a8b89677731387e2115a8a962fae..f07c4d531dac4c3f119f44dc853630e314114799 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * tree-inline.c (expand_call_inline): DECL_SOURCE_LINE_FIRST is
+       removed.
+
 2003-06-09  J"orn Rennecke <joern.rennecke@superh.com>
 
        * sh.c (gen_block_redirect): Use locators.
index 30517626e63d79ddcaa5f51199a73c95fe99ba60..9d2a4484a593764b6de4b31212a702b174f6dc7d 100644 (file)
@@ -1,3 +1,13 @@
+2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
+       (struct lang_decl_func): Add last_line field.
+       * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
+       DECL_SOURCE_LINE_LAST): Remove.
+       * parse.y (missing_return_error, finish_method_declaration,
+       lookup_cl, start_artificial_method_body, source_end_java_method,
+       start_complete_expand_method): Adjust.
+
 2003-06-08  Tom Tromey  <tromey@redhat.com>
 
        * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
index 78bc92406182ed78f641c507969eda76e83c93ef..341928d9509883e1f0c770411d66461bb0279b7c 100644 (file)
@@ -773,6 +773,8 @@ union lang_tree_node
 /* Number of local variable slots needed for the arguments of this function. */
 #define DECL_ARG_SLOT_COUNT(DECL) \
   (DECL_LANG_SPECIFIC(DECL)->u.f.arg_slot_count)
+/* Line number of end of function. */
+#define DECL_FUNCTION_LAST_LINE(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.last_line)
 /* Information on declaration location */
 #define DECL_FUNCTION_WFL(DECL)  (DECL_LANG_SPECIFIC(DECL)->u.f.wfl)
 /* List of checked thrown exceptions, as specified with the `throws'
@@ -974,6 +976,7 @@ struct lang_decl_func GTY(())
   int max_locals;
   int max_stack;
   int arg_slot_count;
+  int last_line;               /* End line number for a function decl */
   tree wfl;                    /* Information on the original location */
   tree throws_list;            /* Exception specified by `throws' */
   tree function_decl_body;     /* Hold all function's statements */
index 207bb8d8bf3c4e6457d0637eb401963537857de4..df1fa562844fe9b24ef485f949899a8f25472a67 100644 (file)
@@ -610,14 +610,6 @@ typedef struct jdeplist_s jdeplist;
 #define GET_CURRENT_BLOCK(F) ((F) ? DECL_FUNCTION_BODY ((F)) : \
                             current_static_block)
 
-/* Merge an other line to the source line number of a decl. Used to
-   remember function's end. */
-#define DECL_SOURCE_LINE_MERGE(DECL,NO) DECL_SOURCE_LINE(DECL) |= (NO << 16)
-
-/* Retrieve those two info separately. */
-#define DECL_SOURCE_LINE_FIRST(DECL)    (DECL_SOURCE_LINE(DECL) & 0x0000ffff)
-#define DECL_SOURCE_LINE_LAST(DECL)     (DECL_SOURCE_LINE(DECL) >> 16)
-
 /* Retrieve line/column from a WFL. */
 #define EXPR_WFL_GET_LINECOL(V,LINE,COL)       \
   {                                            \
index 88c8c31978a54127ba646c606271b4981c8515be..854fd5f07bfe8f9720ae7585704196eaff564a23 100644 (file)
@@ -3139,7 +3139,7 @@ find_expr_with_wfl (tree node)
 static void
 missing_return_error (tree method)
 {
-  EXPR_WFL_SET_LINECOL (wfl_operator, DECL_SOURCE_LINE_LAST (method), -2);
+  EXPR_WFL_SET_LINECOL (wfl_operator, DECL_FUNCTION_LAST_LINE (method), -2);
   parse_error_context (wfl_operator, "Missing return statement");
 }
 
@@ -4758,7 +4758,7 @@ finish_method_declaration (tree method_body)
   /* Merge last line of the function with first line, directly in the
      function decl. It will be used to emit correct debug info. */
   if (!flag_emit_xref)
-    DECL_SOURCE_LINE_MERGE (current_function_decl, ctxp->last_ccb_indent1);
+    DECL_FUNCTION_LAST_LINE (current_function_decl) = ctxp->last_ccb_indent1;
 
   /* Since function's argument's list are shared, reset the
      ARG_FINAL_P parameter that might have been set on some of this
@@ -6604,7 +6604,7 @@ lookup_cl (tree decl)
     }
 
   EXPR_WFL_FILENAME_NODE (cl_v) = get_identifier (DECL_SOURCE_FILE (decl));
-  EXPR_WFL_SET_LINECOL (cl_v, DECL_SOURCE_LINE_FIRST (decl), -1);
+  EXPR_WFL_SET_LINECOL (cl_v, DECL_SOURCE_LINE (decl), -1);
 
   line = java_get_line_col (EXPR_WFL_FILENAME (cl_v),
                            EXPR_WFL_LINENO (cl_v), EXPR_WFL_COLNO (cl_v));
@@ -7313,7 +7313,7 @@ static void
 start_artificial_method_body (tree mdecl)
 {
   DECL_SOURCE_LINE (mdecl) = 1;
-  DECL_SOURCE_LINE_MERGE (mdecl, 1);
+  DECL_FUNCTION_LAST_LINE (mdecl) = 1;
   source_start_java_method (mdecl);
   enter_block ();
 }
@@ -7385,11 +7385,9 @@ source_end_java_method (void)
   /* Generate rtl for function exit.  */
   if (! flag_emit_class_files && ! flag_emit_xref)
     {
-      input_line = DECL_SOURCE_LINE_LAST (fndecl);
+      input_line = DECL_FUNCTION_LAST_LINE (fndecl);
       expand_function_end (input_filename, input_line, 0);
 
-      DECL_SOURCE_LINE (fndecl) = DECL_SOURCE_LINE_FIRST (fndecl);
-
       /* Run the optimizers and output assembler code for this function. */
       rest_of_compilation (fndecl);
     }
@@ -7894,7 +7892,7 @@ start_complete_expand_method (tree mdecl)
       TREE_CHAIN (tem) = next;
     }
   pushdecl_force_head (DECL_ARGUMENTS (mdecl));
-  input_line = DECL_SOURCE_LINE_FIRST (mdecl);
+  input_line = DECL_SOURCE_LINE (mdecl);
   build_result_decl (mdecl);
 }
 
index 1387b9960db5e1591debbe31cbf0b044afe07448..a0fbe8ee635dd8572811e030b89e97996a34dbe6 100644 (file)
@@ -1420,13 +1420,9 @@ expand_call_inline (tp, walk_subtrees, data)
      pointing to the right place.  */
 #ifndef INLINER_FOR_JAVA
   chain = TREE_CHAIN (*tp);
+#endif /* INLINER_FOR_JAVA */
   *tp = build_expr_wfl (expr, DECL_SOURCE_FILE (fn), DECL_SOURCE_LINE (fn),
                        /*col=*/0);
-#else /* INLINER_FOR_JAVA */
-  *tp = build_expr_wfl (expr, DECL_SOURCE_FILE (fn),
-                       DECL_SOURCE_LINE_FIRST(fn),
-                       /*col=*/0);
-#endif /* INLINER_FOR_JAVA */
   EXPR_WFL_EMIT_LINE_NOTE (*tp) = 1;
 #ifndef INLINER_FOR_JAVA
   TREE_CHAIN (*tp) = chain;