From patchwork Fri Jun 17 23:11:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gab Charette X-Patchwork-Id: 100876 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 A878DB6FEE for ; Sat, 18 Jun 2011 09:12:16 +1000 (EST) Received: (qmail 18654 invoked by alias); 17 Jun 2011 23:12:14 -0000 Received: (qmail 18643 invoked by uid 22791); 17 Jun 2011 23:12:13 -0000 X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, TW_CL, TW_CX, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Jun 2011 23:11:58 +0000 Received: from wpaz21.hot.corp.google.com (wpaz21.hot.corp.google.com [172.24.198.85]) by smtp-out.google.com with ESMTP id p5HNBuxZ014960; Fri, 17 Jun 2011 16:11:56 -0700 Received: from gchare.mtv.corp.google.com (gchare.mtv.corp.google.com [172.18.111.122]) by wpaz21.hot.corp.google.com with ESMTP id p5HNBsVo024071; Fri, 17 Jun 2011 16:11:54 -0700 Received: by gchare.mtv.corp.google.com (Postfix, from userid 138564) id 71D891C1E31; Fri, 17 Jun 2011 16:11:54 -0700 (PDT) To: reply@codereview.appspotmail.com, crowl@google.com, dnovillo@google.com, gcc-patches@gcc.gnu.org Subject: [pph] Rename two pph_start_record functions adding in/out. (issue4629049) Message-Id: <20110617231154.71D891C1E31@gchare.mtv.corp.google.com> Date: Fri, 17 Jun 2011 16:11:54 -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 There were two pph_start_record functions, one for the in part, one for the out part. I renamed them to have different names to avoid confusion for the reader (and it also makes it easier for tags). 2011-06-17 Gabriel Charette * gcc/cp/pph-streamer-in.c (pph_in_start_record): Rename from pph_start_record. Update all users. * gcc/cp/pph-streamer-out.c (pph_out_start_record): Rename from pph_start_record. Update all users. --- This patch is available for review at http://codereview.appspot.com/4629049 diff --git a/gcc/cp/pph-streamer-in.c b/gcc/cp/pph-streamer-in.c index b3c2ac9..cd611c7 100644 --- a/gcc/cp/pph-streamer-in.c +++ b/gcc/cp/pph-streamer-in.c @@ -192,7 +192,7 @@ pph_init_read (pph_stream *stream) materialized structure. */ static inline enum pph_record_marker -pph_start_record (pph_stream *stream, unsigned *cache_ix) +pph_in_start_record (pph_stream *stream, unsigned *cache_ix) { enum pph_record_marker marker; @@ -211,7 +211,7 @@ pph_start_record (pph_stream *stream, unsigned *cache_ix) /* Return a shared pointer from the streamer cache in STREAM. This is - called when pph_start_record returns PPH_RECORD_SHARED. It means + called when pph_in_start_record returns PPH_RECORD_SHARED. It means that the data structure we are about to read has been instantiated before and is present in the streamer cache. */ @@ -330,7 +330,7 @@ pph_in_cxx_binding_1 (pph_stream *stream) enum pph_record_marker marker; unsigned ix; - marker = pph_start_record (stream, &ix); + marker = pph_in_start_record (stream, &ix); if (marker == PPH_RECORD_END) return NULL; else if (marker == PPH_RECORD_SHARED) @@ -378,7 +378,7 @@ pph_in_class_binding (pph_stream *stream) enum pph_record_marker marker; unsigned ix; - marker = pph_start_record (stream, &ix); + marker = pph_in_start_record (stream, &ix); if (marker == PPH_RECORD_END) return NULL; else if (marker == PPH_RECORD_SHARED) @@ -401,7 +401,7 @@ pph_in_label_binding (pph_stream *stream) enum pph_record_marker marker; unsigned ix; - marker = pph_start_record (stream, &ix); + marker = pph_in_start_record (stream, &ix); if (marker == PPH_RECORD_END) return NULL; else if (marker == PPH_RECORD_SHARED) @@ -425,7 +425,7 @@ pph_in_binding_level (pph_stream *stream) struct bitpack_d bp; enum pph_record_marker marker; - marker = pph_start_record (stream, &ix); + marker = pph_in_start_record (stream, &ix); if (marker == PPH_RECORD_END) return NULL; else if (marker == PPH_RECORD_SHARED) @@ -495,7 +495,7 @@ pph_in_c_language_function (pph_stream *stream) enum pph_record_marker marker; unsigned ix; - marker = pph_start_record (stream, &ix); + marker = pph_in_start_record (stream, &ix); if (marker == PPH_RECORD_END) return NULL; else if (marker == PPH_RECORD_SHARED) @@ -521,7 +521,7 @@ pph_in_language_function (pph_stream *stream) enum pph_record_marker marker; unsigned ix; - marker = pph_start_record (stream, &ix); + marker = pph_in_start_record (stream, &ix); if (marker == PPH_RECORD_END) return NULL; else if (marker == PPH_RECORD_SHARED) @@ -614,7 +614,7 @@ pph_in_struct_function (pph_stream *stream) gcc_assert (stream->data_in != NULL); - marker = pph_start_record (stream, &ix); + marker = pph_in_start_record (stream, &ix); if (marker == PPH_RECORD_END) return NULL; @@ -713,7 +713,7 @@ pph_in_lang_specific (pph_stream *stream, tree decl) enum pph_record_marker marker; unsigned ix; - marker = pph_start_record (stream, &ix); + marker = pph_in_start_record (stream, &ix); if (marker == PPH_RECORD_END) return; @@ -828,7 +828,7 @@ pph_in_sorted_fields_type (pph_stream *stream) enum pph_record_marker marker; unsigned ix; - marker = pph_start_record (stream, &ix); + marker = pph_in_start_record (stream, &ix); if (marker == PPH_RECORD_END) return NULL; else if (marker == PPH_RECORD_SHARED) @@ -908,7 +908,7 @@ pph_in_lang_type_class (pph_stream *stream, ltc->typeinfo_var = pph_in_tree (stream); ltc->vbases = pph_in_tree_vec (stream); - marker = pph_start_record (stream, &ix); + marker = pph_in_start_record (stream, &ix); if (marker == PPH_RECORD_START) { ltc->nested_udts = pph_in_binding_table (stream); @@ -950,7 +950,7 @@ pph_in_lang_type (pph_stream *stream) enum pph_record_marker marker; unsigned ix; - marker = pph_start_record (stream, &ix); + marker = pph_in_start_record (stream, &ix); if (marker == PPH_RECORD_END) return NULL; else if (marker == PPH_RECORD_SHARED) diff --git a/gcc/cp/pph-streamer-out.c b/gcc/cp/pph-streamer-out.c index 49847a9..83e90c3 100644 --- a/gcc/cp/pph-streamer-out.c +++ b/gcc/cp/pph-streamer-out.c @@ -200,7 +200,7 @@ pph_flush_buffers (pph_stream *stream) cache, write a shared-record marker and return false. */ static inline bool -pph_start_record (pph_stream *stream, void *data) +pph_out_start_record (pph_stream *stream, void *data) { if (data) { @@ -320,7 +320,7 @@ pph_out_cxx_binding_1 (pph_stream *stream, cxx_binding *cb, bool ref_p) { struct bitpack_d bp; - if (!pph_start_record (stream, cb)) + if (!pph_out_start_record (stream, cb)) return; pph_out_tree_or_ref (stream, cb->value, ref_p); @@ -361,7 +361,7 @@ static void pph_out_class_binding (pph_stream *stream, cp_class_binding *cb, bool ref_p) { - if (!pph_start_record (stream, cb)) + if (!pph_out_start_record (stream, cb)) return; pph_out_cxx_binding (stream, cb->base, ref_p); @@ -375,7 +375,7 @@ pph_out_class_binding (pph_stream *stream, cp_class_binding *cb, static void pph_out_label_binding (pph_stream *stream, cp_label_binding *lb, bool ref_p) { - if (!pph_start_record (stream, lb)) + if (!pph_out_start_record (stream, lb)) return; pph_out_tree_or_ref (stream, lb->label, ref_p); @@ -444,7 +444,7 @@ pph_out_binding_level (pph_stream *stream, struct cp_binding_level *bl, cp_label_binding *sl; struct bitpack_d bp; - if (!pph_start_record (stream, bl)) + if (!pph_out_start_record (stream, bl)) return; pph_out_chain_filtered (stream, bl->names, ref_p, NO_BUILTINS); @@ -500,7 +500,7 @@ pph_out_c_language_function (pph_stream *stream, struct c_language_function *clf, bool ref_p) { - if (!pph_start_record (stream, clf)) + if (!pph_out_start_record (stream, clf)) return; pph_out_tree_vec (stream, clf->x_stmt_tree.x_cur_stmt_list, ref_p); @@ -518,7 +518,7 @@ pph_out_language_function (pph_stream *stream, { struct bitpack_d bp; - if (!pph_start_record (stream, lf)) + if (!pph_out_start_record (stream, lf)) return; pph_out_c_language_function (stream, &lf->base, ref_p); @@ -621,7 +621,7 @@ pph_out_struct_function (pph_stream *stream, struct function *fn, bool ref_p) { struct pph_tree_info pti; - if (!pph_start_record (stream, fn)) + if (!pph_out_start_record (stream, fn)) return; output_struct_function_base (stream->ob, fn); @@ -712,7 +712,7 @@ pph_out_lang_specific (pph_stream *stream, tree decl, bool ref_p) struct lang_decl_base *ldb; ld = DECL_LANG_SPECIFIC (decl); - if (!pph_start_record (stream, ld)) + if (!pph_out_start_record (stream, ld)) return; /* Write all the fields in lang_decl_base. */ @@ -792,7 +792,7 @@ pph_out_sorted_fields_type (pph_stream *stream, { int i; - if (!pph_start_record (stream, sft)) + if (!pph_out_start_record (stream, sft)) return; pph_out_uint (stream, sft->len); @@ -864,7 +864,7 @@ pph_out_lang_type_class (pph_stream *stream, pph_out_tree_or_ref (stream, ltc->vtables, ref_p); pph_out_tree_or_ref (stream, ltc->typeinfo_var, ref_p); pph_out_tree_vec (stream, ltc->vbases, ref_p); - if (pph_start_record (stream, ltc->nested_udts)) + if (pph_out_start_record (stream, ltc->nested_udts)) pph_out_binding_table (stream, ltc->nested_udts, ref_p); pph_out_tree_or_ref (stream, ltc->as_base, ref_p); pph_out_tree_vec (stream, ltc->pure_virtuals, ref_p); @@ -901,7 +901,7 @@ pph_out_lang_type (pph_stream *stream, tree type, bool ref_p) struct lang_type *lt; lt = TYPE_LANG_SPECIFIC (type); - if (!pph_start_record (stream, lt)) + if (!pph_out_start_record (stream, lt)) return; pph_out_lang_type_header (stream, <->u.h);