Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(224)

Issue 5142049: [pph] Prepare for mutation detection [2/3] (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 9 months ago by Diego Novillo
Modified:
12 years, 8 months ago
Reviewers:
gcharette1
CC:
Lawrence Crowl, gcc-patches_gcc.gnu.org
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+191 lines, -80 lines) Patch
M gcc/cp/ChangeLog.pph View 1 chunk +22 lines, -0 lines 0 comments Download
M gcc/cp/pph-streamer.h View 4 chunks +51 lines, -6 lines 0 comments Download
M gcc/cp/pph-streamer.c View 4 chunks +23 lines, -37 lines 0 comments Download
M gcc/cp/pph-streamer-in.c View 15 chunks +56 lines, -27 lines 0 comments Download
M gcc/cp/pph-streamer-out.c View 2 chunks +39 lines, -10 lines 0 comments Download

Messages

Total messages: 4
Diego Novillo
The second patch re-factors pph_cache_get to remove the cache selection logic into a separate function. ...
12 years, 9 months ago (2011-09-27 16:54:56 UTC) #1
gcharette1
More comments to come on [3/3], for now just a single comment below on this ...
12 years, 9 months ago (2011-09-28 21:23:45 UTC) #2
Diego Novillo
On Wed, Sep 28, 2011 at 17:23, Gabriel Charette <gcharette1@gmail.com> wrote: > More comments to ...
12 years, 9 months ago (2011-09-28 21:32:02 UTC) #3
gcharette1
12 years, 9 months ago (2011-09-28 22:45:18 UTC) #4
On Wed, Sep 28, 2011 at 5:31 PM, Diego Novillo <dnovillo@google.com> wrote:
> On Wed, Sep 28, 2011 at 17:23, Gabriel Charette <gcharette1@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).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b