This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [pph] Prepare for mutation detection [2/3] (issue5142049)
- From: Gabriel Charette <gcharette1 at gmail dot com>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: reply at codereview dot appspotmail dot com, crowl at google dot com, gcc-patches at gcc dot gnu dot org
- Date: Wed, 28 Sep 2011 17:23:15 -0400
- Subject: Re: [pph] Prepare for mutation detection [2/3] (issue5142049)
- References: <20110927165454.91CDD1DA1C7@topo.tor.corp.google.com>
More comments to come on [3/3], for now just a single comment below on
this specific patch:
> diff --git a/gcc/cp/pph-streamer-in.c b/gcc/cp/pph-streamer-in.c
> index 0bd4d64..b267833 100644
> --- a/gcc/cp/pph-streamer-in.c
> +++ b/gcc/cp/pph-streamer-in.c
> @@ -439,7 +439,10 @@ pph_in_cxx_binding_1 (pph_stream *stream)
> Â if (marker == PPH_RECORD_END)
> Â Â return NULL;
> Â else if (pph_is_reference_marker (marker))
> - Â Âreturn (cxx_binding *) pph_cache_get (&stream->cache, image_ix, ix, marker);
> + Â Â{
> + Â Â Âpph_cache *cache = pph_cache_select (stream, marker, image_ix);
> + Â Â Âreturn (cxx_binding *) pph_cache_get (cache, ix);
> + Â Â}
Seems like you replaced the pph_cache_get one liners with these
two-liners. Wouldn't a simple inline function be nicer for this?
Gab