From patchwork Thu Sep 20 17:33:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 185436 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 1BFF92C009D for ; Fri, 21 Sep 2012 03:33:56 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1348767237; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Subject:Date:Message-ID:User-Agent: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=3p4q6IkdRVnmrZ+MJTE3iDsUqLs=; b=Op1/oGsBQtEMU2R RayfXNwWG/2jZ0Mhk5c4fv4grq1Rp0rq4k7Ia4AqDwW9/xs6YSWb98XUtF/OT1Hm +oNvf3fzDe9cPKmhxZVkYwi4whyHdGr4pE6Fz4bDKj6G66Om1PGOvZDxQhKAqsw8 61E4yfK5nZEAECK0wHvsJ38asGIQ= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:Received:Received:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=rnibQ2N+z6F81xvSzRCTPwW21pJFnNTJflcLcbiDGh/JiiHQbUc4fAVFakWDs2 nPJM4w+4m+p0aPBrlv9Uw/2v4WUXsJgle6d/fIFwQv4QXQdMm/LfEjiKUN7ftY4Z 67hm4JV4s0t3n9AwJQmqvmAbcLljl27qn63NvxpJsJ5d8=; Received: (qmail 6525 invoked by alias); 20 Sep 2012 17:33:49 -0000 Received: (qmail 6514 invoked by uid 22791); 20 Sep 2012 17:33:48 -0000 X-SWARE-Spam-Status: No, hits=-5.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, TW_FN, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mail-pb0-f47.google.com (HELO mail-pb0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 Sep 2012 17:33:34 +0000 Received: by pbcwy7 with SMTP id wy7so5978011pbc.20 for ; Thu, 20 Sep 2012 10:33:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type:x-gm-message-state; bh=/Hygu6wFXCPxRcJ+rp1WN0uVl1LEVeVw53xo/lRvGvk=; b=JRfCXRi6lLAluK2jGsCr5Ihl23dHL8E4n4Ph6mM21EiJZ+XPtJdBru44xNUpNTa9YM ei+nI+aaz5kK7kort6VBoA125wXBMTy2t2FtJiz2F/8HTIRM6/JsgKDfScOKzB3YFvio jwX7nltFFtnMGjXgnmOQKu0BmyT3yRm53cV7TQLt9eQcvCqsWhsAvFIyBjAh6NHL1+ll yuJm+GFOHyMLVK04NbKLlci0+Ees5iY5UCX6QXOJtgeMvFaZJJRbYk4sIi/JfPR2Cfas 5py4Na6j4TuE8yLh2+hPUpkLdQzD9FtJDeIrwFtgY2jH92WEIx+B4OevHqnComBUvui7 wNJQ== Received: by 10.66.72.132 with SMTP id d4mr6951399pav.61.1348162413303; Thu, 20 Sep 2012 10:33:33 -0700 (PDT) Received: by 10.66.72.132 with SMTP id d4mr6951384pav.61.1348162413209; Thu, 20 Sep 2012 10:33:33 -0700 (PDT) Received: from coign.google.com ([172.19.252.231]) by mx.google.com with ESMTPS id io1sm3788845pbc.43.2012.09.20.10.33.32 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 20 Sep 2012 10:33:32 -0700 (PDT) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: Go patch committed: Keep up with main compiler Date: Thu, 20 Sep 2012 10:33:31 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmUPdAzcfXHnPdm4ux+Fv8+ObXxmE1fa2FWfIT3pS8lzDT9/L9Y6/T8RQVIj/Lrp1SH7287W0j85Zvquujs2zcR7yb696+3Wb8qDw1l/CglkeB/TY6Fa0aZ1iYb/Mo2DmregaVrtivnXuTfn7fS0eutTbJAiz3B4Szmk6AUIdbfY5RJUpBsKpB3DOhNJeDqZYC/yfUL X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This patch to the Go frontend is really from Martin Jambor. It adjusts the Go frontend for changes in the main body of the compiler. This code in the Go frontend is slated to move out of gcc/go/gofrontend into gcc/go, hopefully sooner rather than later. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r fb054e3636c2 go/gogo-tree.cc --- a/go/gogo-tree.cc Thu Sep 20 09:28:23 2012 -0700 +++ b/go/gogo-tree.cc Thu Sep 20 10:02:17 2012 -0700 @@ -476,7 +476,6 @@ DECL_SAVED_TREE(fndecl) = init_stmt_list; - current_function_decl = fndecl; if (DECL_STRUCT_FUNCTION(fndecl) == NULL) push_struct_function(fndecl); else @@ -487,7 +486,6 @@ cgraph_add_new_function(fndecl, false); - current_function_decl = NULL_TREE; pop_cfun(); } @@ -864,17 +862,13 @@ // means that we need an fndecl. if (init_fndecl == NULL_TREE) init_fndecl = this->initialization_function_decl(); - current_function_decl = init_fndecl; if (DECL_STRUCT_FUNCTION(init_fndecl) == NULL) push_struct_function(init_fndecl); else push_cfun(DECL_STRUCT_FUNCTION(init_fndecl)); - tree var_decl = is_sink ? NULL_TREE : vec[i]; var_init_tree = no->var_value()->get_init_block(this, NULL, var_decl); - - current_function_decl = NULL_TREE; pop_cfun(); } @@ -1126,15 +1120,12 @@ cfun->function_end_locus = func->block()->end_location().gcc_location(); - current_function_decl = decl; - func->build_tree(gogo, this); gimplify_function_tree(decl); cgraph_finalize_function(decl, true); - current_function_decl = NULL_TREE; pop_cfun(); } }