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

Issue 4873051: [pph] Support for references to symbols in other PPH images (Closed)

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

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+511 lines, -260 lines) Patch
M gcc/cp/ChangeLog.pph View 1 chunk +50 lines, -0 lines 0 comments Download
M gcc/cp/name-lookup.c View 2 chunks +6 lines, -4 lines 0 comments Download
M gcc/cp/pph.c View 1 chunk +5 lines, -1 line 0 comments Download
M gcc/cp/pph-streamer.h View 6 chunks +50 lines, -16 lines 0 comments Download
M gcc/cp/pph-streamer.c View 7 chunks +99 lines, -45 lines 0 comments Download
M gcc/cp/pph-streamer-in.c View 21 chunks +117 lines, -82 lines 0 comments Download
M gcc/cp/pph-streamer-out.c View 15 chunks +175 lines, -108 lines 0 comments Download
M gcc/testsuite/ChangeLog.pph View 1 chunk +6 lines, -0 lines 0 comments Download
M gcc/testsuite/g++.dg/pph/x1tmplclass2.cc View 1 chunk +1 line, -1 line 0 comments Download
M gcc/testsuite/g++.dg/pph/x4tmplclass2.cc View 1 chunk +1 line, -1 line 0 comments Download
M gcc/testsuite/g++.dg/pph/z4tmplclass2.cc View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 3
Diego Novillo
This patch finishes the support for external references to symbols in other PPH files. This ...
12 years, 8 months ago (2011-08-16 03:05:12 UTC) #1
Gabriel Charette
I really like the way this is implemented! In particular having our own cache is ...
12 years, 8 months ago (2011-08-16 18:04:21 UTC) #2
Diego Novillo
12 years, 8 months ago (2011-08-16 18:57:28 UTC) #3
On 08/16/2011 02:04 PM, Gabriel Charette wrote:

> Setting *cache_ix to (unsigned) -1 used to be a "hack" (with a comment
> explaining it which was removed just below), to avoid a warning about
> it being unset in a branch, but that branch was only PPH_RECORD_END,
> in which case it didn't matter.

Yeah, I remember, but I set them to -1 now as an actual return value now.

> Now that we actually check in pph_cache_get that include_ix ==
> (unsigned) -1, I'm not so sure this is good... while (unsigned) -1 is
> a very large unsigned int, it's not impossible to have an actual cache
> entry with that number...

Oh, no.  If we ever need 4B entries in the cache, we will die much 
sooner than this.

>> @@ -457,13 +478,13 @@ pph_in_cxx_binding_1 (pph_stream *stream)
>>    cxx_binding *cb;
>>    tree value, type;
>>    enum pph_record_marker marker;
>> -  unsigned ix;
>> +  unsigned ix, include_ix;
>
> Sometimes you call the local variable "include_ix"...
>
>> @@ -505,13 +526,13 @@ pph_in_class_binding (pph_stream *stream)
>>   {
>>    cp_class_binding *cb;
>>    enum pph_record_marker marker;
>> -  unsigned ix;
>> +  unsigned image_ix, ix;
>
> ... and sometimes image_ix: consistency would be nice, although not
necessary...

Thanks, I'll fix.  I'm horribly inconsistent with naming schemes (blame 
my evil twin).


Diego.

Sign in to reply to this message.

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