On Wed, Sep 28, 2011 at 5:31 PM, Diego Novillo <dnovi...@google.com> wrote: > On Wed, Sep 28, 2011 at 17:23, Gabriel Charette <gcharet...@gmail.com> wrote: >> 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? > > I call them separately. Or do you mean a single call that combines > them for the common case? >
Yes that's what I mean, a single call that combines both, since that's the common usage and I feel there should be as little cache code at the top of every pph_* function (in particular, every time a new pph streaming function is added all that code needs to be "duplicated", so the less code the better imo).