OSDN Git Service

2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
authorapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 1 Feb 2001 10:35:50 +0000 (10:35 +0000)
committerapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 1 Feb 2001 10:35:50 +0000 (10:35 +0000)
* jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
argument.
* parse.y (finish_method_declaration): Code accounting for WFLed
method DECL_NAMEs deleted.
(check_abstract_method_definitions): Likewise.
(resolve_type_during_patch): Layout resolved type.
* typeck.c (lookup_do): Removed unused local.

(http://gcc.gnu.org/ml/gcc-patches/2001-02/msg00005.html)

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39388 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/java/ChangeLog
gcc/java/jcf-parse.c
gcc/java/parse.y
gcc/java/typeck.c

index 5ff6bde..d4543db 100644 (file)
@@ -1,3 +1,13 @@
+2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
+
+       * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
+       argument.
+       * parse.y (finish_method_declaration): Code accounting for WFLed
+       method DECL_NAMEs deleted.
+       (check_abstract_method_definitions): Likewise.
+       (resolve_type_during_patch): Layout resolved type.
+       * typeck.c (lookup_do): Removed unused local.
+
 2000-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
 
        * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
index 10baf59..24eb0a3 100644 (file)
@@ -1135,5 +1135,5 @@ init_jcf_parse ()
   /* Register roots with the garbage collector.  */
   ggc_add_tree_root (parse_roots, sizeof (parse_roots) / sizeof(tree));
 
-  ggc_add_root (&current_jcf, 1, sizeof (JCF), ggc_mark_jcf);
+  ggc_add_root (&current_jcf, 1, sizeof (JCF), (void (*)(void *))ggc_mark_jcf);
 }
index cf438e9..d566133 100644 (file)
@@ -4572,21 +4572,21 @@ finish_method_declaration (method_body)
   /* 8.4.5 Method Body */
   if ((flags & ACC_ABSTRACT || flags & ACC_NATIVE) && method_body)
     {
-      tree wfl = DECL_NAME (current_function_decl);
-      parse_error_context (wfl
+      tree name = DECL_NAME (current_function_decl);
+      parse_error_context (DECL_FUNCTION_WFL (current_function_decl)
                           "%s method `%s' can't have a body defined",
                           (METHOD_NATIVE (current_function_decl) ?
                            "Native" : "Abstract"),
-                          IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl)));
+                          IDENTIFIER_POINTER (name));
       method_body = NULL_TREE;
     }
   else if (!(flags & ACC_ABSTRACT) && !(flags & ACC_NATIVE) && !method_body)
     {
-      tree wfl = DECL_NAME (current_function_decl);
+      tree name = DECL_NAME (current_function_decl);
       parse_error_context
-       (wfl
+       (DECL_FUNCTION_WFL (current_function_decl)
         "Non native and non abstract method `%s' must have a body defined",
-        IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl)));
+        IDENTIFIER_POINTER (name));
       method_body = NULL_TREE;
     }
 
@@ -5904,13 +5904,6 @@ check_abstract_method_definitions (do_interface, class_decl, type)
          char *t = xstrdup (lang_printable_name 
                            (TREE_TYPE (TREE_TYPE (method)), 0));
          tree ccn = DECL_NAME (TYPE_NAME (DECL_CONTEXT (method)));
-         tree saved_wfl = NULL_TREE;
-         
-         if (TREE_CODE (DECL_NAME (method)) == EXPR_WITH_FILE_LOCATION)
-           {
-             saved_wfl = DECL_NAME (method);
-             DECL_NAME (method) = EXPR_WFL_NODE (DECL_NAME (method));
-           }
          
          parse_error_context 
            (lookup_cl (class_decl),
@@ -5924,9 +5917,6 @@ check_abstract_method_definitions (do_interface, class_decl, type)
             IDENTIFIER_POINTER (DECL_NAME (class_decl)));
          ok = 0;
          free (t);
-
-         if (saved_wfl)
-           DECL_NAME (method) = saved_wfl;
        }
     }
 
@@ -13870,7 +13860,7 @@ resolve_type_during_patch (type)
 {
   if (unresolved_type_p (type, NULL))
     {
-      tree type_decl = resolve_no_layout (EXPR_WFL_NODE (type), type);
+      tree type_decl = resolve_and_layout (EXPR_WFL_NODE (type), type);
       if (!type_decl)
        {
          parse_error_context (type, 
index 5ed5d53..83be326 100644 (file)
@@ -834,8 +834,6 @@ lookup_do (searched_class, searched_interface, method_name, signature, signature
           method != NULL_TREE;  method = TREE_CHAIN (method))
        {
          tree method_sig = (*signature_builder) (TREE_TYPE (method));
-         tree name = DECL_NAME (method);
-
          if (DECL_NAME (method) == method_name && method_sig == signature)
            return method;
        }