From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46892 invoked by alias); 20 May 2015 22:32:35 -0000 Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org Received: (qmail 46860 invoked by uid 89); 20 May 2015 22:32:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 May 2015 22:32:32 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4KMWVph001865 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 20 May 2015 18:32:31 -0400 Received: from reynosa.quesejoda.com (unused [10.10.50.198] (may be forged)) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4KMWUUj022123; Wed, 20 May 2015 18:32:30 -0400 Message-ID: <555D0B7E.1040007@redhat.com> Date: Wed, 20 May 2015 22:32:00 -0000 From: Aldy Hernandez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: gcc-patches , java-patches@gcc.gnu.org Subject: PING: Re: [patch 6/10] debug-early merge: Java front-end References: <554C0526.5090206@redhat.com> In-Reply-To: <554C0526.5090206@redhat.com> Content-Type: multipart/mixed; boundary="------------030303080209010502000607" X-SW-Source: 2015-q2/txt/msg00018.txt.bz2 This is a multi-part message in MIME format. --------------030303080209010502000607 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 64 Perhaps I should've sent this to the java-patches list. PING. --------------030303080209010502000607 Content-Type: text/x-patch; name="dearly-java.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dearly-java.patch" Content-length: 3952 gcc/java/ * class.c: Remove pending_static_fields. (add_field): Remove use of pending_static_fields. (java_write_globals): Remove. * decl.c (java_mark_class_local): Remove use of pending_static_fields. * java-tree.h: Remove pending_static_fields and java_write_globals. * jcf-parse.c (java_parse_file): Call global_decl_processing. * lang.c (LANG_HOOKS_WRITE_GLOBALS): Remove. diff --git a/gcc/java/class.c b/gcc/java/class.c index d1adb58..ded4f83 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -123,10 +123,6 @@ static GTY(()) vec *registered_class; currently being compiled. */ static GTY(()) tree this_classdollar; -/* A list of static class fields. This is to emit proper debug - info for them. */ -vec *pending_static_fields; - /* Return the node that most closely represents the class whose name is IDENT. Start the search from NODE (followed by its siblings). Return NULL if an appropriate node does not exist. */ @@ -895,8 +891,6 @@ add_field (tree klass, tree name, tree field_type, int flags) /* Considered external unless we are compiling it into this object file. */ DECL_EXTERNAL (field) = (is_compiled_class (klass) != 2); - if (!DECL_EXTERNAL (field)) - vec_safe_push (pending_static_fields, field); } return field; @@ -3273,17 +3267,4 @@ in_same_package (tree name1, tree name2) return (pkg1 == pkg2); } -/* lang_hooks.decls.final_write_globals: perform final processing on - global variables. */ - -void -java_write_globals (void) -{ - tree *vec = vec_safe_address (pending_static_fields); - int len = vec_safe_length (pending_static_fields); - write_global_declarations (); - emit_debug_global_declarations (vec, len); - vec_free (pending_static_fields); -} - #include "gt-java-class.h" diff --git a/gcc/java/decl.c b/gcc/java/decl.c index 72133b4..80765c7 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -1971,11 +1971,7 @@ java_mark_class_local (tree klass) for (t = TYPE_FIELDS (klass); t ; t = DECL_CHAIN (t)) if (FIELD_STATIC (t)) - { - if (DECL_EXTERNAL (t)) - vec_safe_push (pending_static_fields, t); - java_mark_decl_local (t); - } + java_mark_decl_local (t); for (t = TYPE_METHODS (klass); t ; t = DECL_CHAIN (t)) if (!METHOD_ABSTRACT (t)) diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 22c9789..58a60b8 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -1194,10 +1194,6 @@ extern void rewrite_reflection_indexes (void *); int cxx_keyword_p (const char *name, int length); -extern GTY(()) vec *pending_static_fields; - -extern void java_write_globals (void); - #define DECL_FINAL(DECL) DECL_LANG_FLAG_3 (DECL) /* Access flags etc for a method (a FUNCTION_DECL): */ diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index e609331..8042a02 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -60,6 +60,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "bitmap.h" #include "target.h" #include "wide-int.h" +#include "toplev.h" #ifdef HAVE_LOCALE_H #include @@ -2001,6 +2002,9 @@ java_parse_file (void) /* Arrange for any necessary initialization to happen. */ java_emit_static_constructor (); gcc_assert (global_bindings_p ()); + + /* Do final processing on globals. */ + global_decl_processing (); } diff --git a/gcc/java/lang.c b/gcc/java/lang.c index dac322d..9654ace 100644 --- a/gcc/java/lang.c +++ b/gcc/java/lang.c @@ -149,8 +149,6 @@ struct GTY(()) language_function { #define LANG_HOOKS_DECL_PRINTABLE_NAME lang_printable_name #undef LANG_HOOKS_PRINT_ERROR_FUNCTION #define LANG_HOOKS_PRINT_ERROR_FUNCTION java_print_error_function -#undef LANG_HOOKS_WRITE_GLOBALS -#define LANG_HOOKS_WRITE_GLOBALS java_write_globals #undef LANG_HOOKS_TYPE_FOR_MODE #define LANG_HOOKS_TYPE_FOR_MODE java_type_for_mode --------------030303080209010502000607--