From patchwork Thu Jun 23 00:00:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gab Charette X-Patchwork-Id: 101562 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 819DBB6F64 for ; Thu, 23 Jun 2011 10:01:21 +1000 (EST) Received: (qmail 27284 invoked by alias); 23 Jun 2011 00:01:20 -0000 Received: (qmail 27272 invoked by uid 22791); 23 Jun 2011 00:01:19 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, TW_CX, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Jun 2011 00:01:05 +0000 Received: from hpaq14.eem.corp.google.com (hpaq14.eem.corp.google.com [172.25.149.14]) by smtp-out.google.com with ESMTP id p5N012gn019132; Wed, 22 Jun 2011 17:01:03 -0700 Received: from gchare.mtv.corp.google.com (gchare.mtv.corp.google.com [172.18.111.122]) by hpaq14.eem.corp.google.com with ESMTP id p5N00prN013103; Wed, 22 Jun 2011 17:01:01 -0700 Received: by gchare.mtv.corp.google.com (Postfix, from userid 138564) id 9F45D1C0DAE; Wed, 22 Jun 2011 17:00:43 -0700 (PDT) To: reply@codereview.appspotmail.com, gcc-patches@gcc.gnu.org Subject: [pph] Fix binding_level's names_size streaming (issue4634071) Message-Id: <20110623000043.9F45D1C0DAE@gchare.mtv.corp.google.com> Date: Wed, 22 Jun 2011 17:00:43 -0700 (PDT) From: gchare@google.com (Gabriel Charette) X-System-Of-Record: true 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 Here is the patch removing names_size. We found out it was write-only and that we could remove it. I tested it with a full bootstrap build as well as a full regression test (make check-g++). (actually one of the pph test fails, but that's because of a line number issue in where we expect the ICE... I'll have to re-upload the patch as the script already submitted the files...) 2011-06-22 Gabriel Charette * gcc/cp/name-lookup.h (cp_binding_level): Removed unused member names_size. Update all users. --- This patch is available for review at http://codereview.appspot.com/4634071 diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 54977ce..297c57e 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -544,7 +544,6 @@ add_decl_to_level (tree decl, cxx_scope *b) necessary. */ TREE_CHAIN (decl) = b->names; b->names = decl; - b->names_size++; /* If appropriate, add decl to separate list of statics. We include extern variables because they might turn out to be diff --git a/gcc/cp/name-lookup.h b/gcc/cp/name-lookup.h index 009b5d9..5f266eb 100644 --- a/gcc/cp/name-lookup.h +++ b/gcc/cp/name-lookup.h @@ -191,9 +191,6 @@ struct GTY(()) cp_binding_level { are wrapped in TREE_LISTs; the TREE_VALUE is the OVERLOAD. */ tree names; - /* Count of elements in names chain. */ - size_t names_size; - /* A chain of NAMESPACE_DECL nodes. */ tree namespaces; diff --git a/gcc/cp/pph-streamer-in.c b/gcc/cp/pph-streamer-in.c index 0e8c6bf..a535cab 100644 --- a/gcc/cp/pph-streamer-in.c +++ b/gcc/cp/pph-streamer-in.c @@ -442,7 +442,6 @@ pph_in_binding_level (pph_stream *stream) ALLOC_AND_REGISTER (stream, ix, bl, ggc_alloc_cleared_cp_binding_level ()); bl->names = pph_in_chain (stream); - bl->names_size = pph_in_uint (stream); bl->namespaces = pph_in_chain (stream); bl->static_decls = pph_in_tree_vec (stream); diff --git a/gcc/cp/pph-streamer-out.c b/gcc/cp/pph-streamer-out.c index f219cef..7a6c516 100644 --- a/gcc/cp/pph-streamer-out.c +++ b/gcc/cp/pph-streamer-out.c @@ -448,7 +448,6 @@ pph_out_binding_level (pph_stream *stream, struct cp_binding_level *bl, return; pph_out_chain_filtered (stream, bl->names, ref_p, NO_BUILTINS); - pph_out_uint (stream, bl->names_size); pph_out_chain_filtered (stream, bl->namespaces, ref_p, NO_BUILTINS); pph_out_tree_vec (stream, bl->static_decls, ref_p);