From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29456 invoked by alias); 26 Nov 2007 18:52:13 -0000 Received: (qmail 29448 invoked by uid 22791); 26 Nov 2007 18:52:13 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 26 Nov 2007 18:52:08 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.1) with ESMTP id lAQIq7L4029289; Mon, 26 Nov 2007 13:52:07 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lAQIq6K1012539; Mon, 26 Nov 2007 13:52:06 -0500 Received: from pantani.quesejoda.com (sebastian-int.corp.redhat.com [172.16.52.221]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lAQIq5xl016388; Mon, 26 Nov 2007 13:52:06 -0500 Received: by pantani.quesejoda.com (Postfix, from userid 500) id B832311A0330; Mon, 26 Nov 2007 14:52:05 -0400 (AST) Date: Mon, 26 Nov 2007 22:20:00 -0000 From: Aldy Hernandez To: dnovillo@google.com, gcc-patches@gcc.gnu.org Subject: [tuples] java: make it build Message-ID: <20071126185205.GA4867@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-11/txt/msg01412.txt.bz2 This patch tuplifies the Java front-end. Looks like Java's pretty clean; not much to do. Committed to branch. * gimple.h (gimple_bind_block): Update comment. * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p sequences. (java_gimplify_self_mod_expr): Same. Handl BIND_EXPRs correctly with regards to tuples. * java-tree.h (java_gimplify_expr): Make pre_p and post_p sequences. Index: java/java-gimplify.c =================================================================== --- java/java-gimplify.c (revision 130377) +++ java/java-gimplify.c (working copy) @@ -33,7 +33,7 @@ The Free Software Foundation is independ static tree java_gimplify_block (tree); static enum gimplify_status java_gimplify_modify_expr (tree *); -static enum gimplify_status java_gimplify_self_mod_expr (tree*, tree*, tree *); +static enum gimplify_status java_gimplify_self_mod_expr (tree *, gimple_seq, gimple_seq); static void dump_java_tree (enum tree_dump_index, tree); @@ -53,8 +53,8 @@ java_genericize (tree fndecl) /* Gimplify a Java tree. */ int -java_gimplify_expr (tree *expr_p, tree *pre_p ATTRIBUTE_UNUSED, - tree *post_p ATTRIBUTE_UNUSED) +java_gimplify_expr (tree *expr_p, gimple_seq pre_p ATTRIBUTE_UNUSED, + gimple_seq post_p ATTRIBUTE_UNUSED) { enum tree_code code = TREE_CODE (*expr_p); @@ -160,8 +160,8 @@ java_gimplify_modify_expr (tree *modify_ between the reading and the writing. */ static enum gimplify_status -java_gimplify_self_mod_expr (tree *expr_p, tree *pre_p ATTRIBUTE_UNUSED, - tree *post_p ATTRIBUTE_UNUSED) +java_gimplify_self_mod_expr (tree *expr_p, gimple_seq pre_p ATTRIBUTE_UNUSED, + gimple_seq post_p ATTRIBUTE_UNUSED) { tree lhs = TREE_OPERAND (*expr_p, 0); @@ -180,7 +180,7 @@ java_gimplify_block (tree java_block) { tree decls = BLOCK_VARS (java_block); tree body = BLOCK_EXPR_BODY (java_block); - tree outer = gimple_current_bind_expr (); + gimple outer = gimple_current_bind_expr (); tree block; /* Don't bother with empty blocks. */ @@ -199,10 +199,10 @@ java_gimplify_block (tree java_block) routines generate info for the variables in that block. */ TREE_USED (block) = 1; - if (outer != NULL_TREE) + if (outer != NULL) { - outer = BIND_EXPR_BLOCK (outer); - BLOCK_SUBBLOCKS (outer) = chainon (BLOCK_SUBBLOCKS (outer), block); + tree b = gimple_bind_block (outer); + BLOCK_SUBBLOCKS (b) = chainon (BLOCK_SUBBLOCKS (b), block); } BLOCK_EXPR_BODY (java_block) = NULL_TREE; Index: java/java-tree.h =================================================================== --- java/java-tree.h (revision 130377) +++ java/java-tree.h (working copy) @@ -1566,7 +1566,7 @@ enum #undef DEBUG_JAVA_BINDING_LEVELS extern void java_genericize (tree); -extern int java_gimplify_expr (tree *, tree *, tree *); +extern int java_gimplify_expr (tree *, gimple_seq, gimple_seq); extern FILE *finput; Index: gimple.h =================================================================== --- gimple.h (revision 130377) +++ gimple.h (working copy) @@ -1429,7 +1429,7 @@ gimple_bind_set_body (gimple gs, const_g /* Return the TREE_BLOCK node associated with GIMPLE_BIND statement - GS. */ + GS. This is analogous to the BIND_EXPR_BLOCK field in trees. */ static inline tree gimple_bind_block (const_gimple gs)