From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6848 invoked by alias); 9 Jul 2014 10:23:59 -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 6807 invoked by uid 89); 9 Jul 2014 10:23:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-we0-f177.google.com Received: from mail-we0-f177.google.com (HELO mail-we0-f177.google.com) (74.125.82.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 09 Jul 2014 10:23:55 +0000 Received: by mail-we0-f177.google.com with SMTP id u56so7242323wes.36 for ; Wed, 09 Jul 2014 03:23:52 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.195.12.97 with SMTP id ep1mr30351050wjd.26.1404901432077; Wed, 09 Jul 2014 03:23:52 -0700 (PDT) Received: by 10.195.11.202 with HTTP; Wed, 9 Jul 2014 03:23:52 -0700 (PDT) In-Reply-To: <1404850329-16974-1-git-send-email-mjw@redhat.com> References: <1404850329-16974-1-git-send-email-mjw@redhat.com> Date: Wed, 09 Jul 2014 10:23:00 -0000 Message-ID: Subject: Re: [PATCH] java: Use build_qualified_type instead of build_type_variant. From: Richard Biener To: Mark Wielaard Cc: GCC Patches , GCJ-patches , Tom Tromey Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2014-q3/txt/msg00005.txt.bz2 On Tue, Jul 8, 2014 at 10:12 PM, Mark Wielaard wrote: > The java frontend is one of the only places where build_type_variant is > still used. New code should use build_qualified_type. See gcc/tree.h. > > Build and tested on x86_64-unknown-linux-gnu. Ok. Can build_type_variant be removed now? Thanks, Richard. > gcc/java/ChangeLog > > * builtins.c (putVolatile_builtin): Use build_qualified_type > instead of build_type_variant. > (getVolatile_builtin): Likewise. > (build_classdollar_field): Likewise. > --- > gcc/java/ChangeLog | 7 +++++++ > gcc/java/builtins.c | 8 +++++--- > gcc/java/class.c | 8 ++++---- > 3 files changed, 16 insertions(+), 7 deletions(-) > > diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog > index ce90e28..d12b664 100644 > --- a/gcc/java/ChangeLog > +++ b/gcc/java/ChangeLog > @@ -1,3 +1,10 @@ > +2014-07-08 Mark Wielaard > + > + * builtins.c (putVolatile_builtin): Use build_qualified_type > + instead of build_type_variant. > + (getVolatile_builtin): Likewise. > + (build_classdollar_field): Likewise. > + > 2014-06-24 Trevor Saunders > > * jcf-io.c: Adjust. > diff --git a/gcc/java/builtins.c b/gcc/java/builtins.c > index 1ce9ce5..12c427d 100644 > --- a/gcc/java/builtins.c > +++ b/gcc/java/builtins.c > @@ -394,7 +394,8 @@ putVolatile_builtin (tree method_return_type ATTRIBUTE_UNUSED, > > addr = build_addr_sum (value_type, obj_arg, offset_arg); > addr > - = fold_convert (build_pointer_type (build_type_variant (value_type, 0, 1)), > + = fold_convert (build_pointer_type (build_qualified_type > + (value_type, TYPE_QUAL_VOLATILE)), > addr); > > stmt = build_call_expr (builtin_decl_explicit (BUILT_IN_SYNC_SYNCHRONIZE), 0); > @@ -418,8 +419,9 @@ getVolatile_builtin (tree method_return_type ATTRIBUTE_UNUSED, > > addr = build_addr_sum (method_return_type, obj_arg, offset_arg); > addr > - = fold_convert (build_pointer_type (build_type_variant > - (method_return_type, 0, 1)), addr); > + = fold_convert (build_pointer_type (build_qualified_type > + (method_return_type, > + TYPE_QUAL_VOLATILE)), addr); > > stmt = build_call_expr (builtin_decl_explicit (BUILT_IN_SYNC_SYNCHRONIZE), 0); > tmp = build_decl (BUILTINS_LOCATION, VAR_DECL, NULL, method_return_type); > diff --git a/gcc/java/class.c b/gcc/java/class.c > index dae3218..0d51165 100644 > --- a/gcc/java/class.c > +++ b/gcc/java/class.c > @@ -1067,11 +1067,11 @@ build_classdollar_field (tree type) > decl > = build_decl (input_location, > VAR_DECL, decl_name, > - (build_type_variant > + (build_qualified_type > (build_pointer_type > - (build_type_variant (class_type_node, > - /* const */ 1, 0)), > - /* const */ 1, 0))); > + (build_qualified_type (class_type_node, > + TYPE_QUAL_CONST)), > + TYPE_QUAL_CONST))); > TREE_STATIC (decl) = 1; > TREE_CONSTANT (decl) = 1; > TREE_READONLY (decl) = 1; > -- > 1.7.1 >