[pph] Fix var order when streaming in. (issue4635074)

dnovillo@google.com dnovillo@google.com
Tue Jun 28 12:01:00 GMT 2011


On 2011/06/28 00:27:04, Gabriel Charette wrote:
> The names and namespaces chains are built by adding each new element
to the
> front of the list. When streaming it in we traverse the list of names
and re-add
> them to the current chains; thus reversing the order in which they
were defined
> in the header file.

> Since this is a singly linked-list we cannot start from the tail; thus
we
> reverse the chain in place and then traverse it, now adding the
bindings in the
> same order they were found in the header file.

> I introduced a new failing test to test this. The test showed the
reverse
> behaviour prior to the patch.
> The test still fails however, there is another inversion problem
between the
> global variables and the .LFBO, .LCFI0, ...
> This patch only fixes the inversion of the global variables
declarations in the
> assembly, not the second issue this is exposing.
> This second issue is potentially already exposed by another test?? Do
we need
> this new test?

It can't hurt.

> This fixes all of the assembly mismatches in c1limits-externalid.cc
however!

Nice!

> 2011-06-27  Gabriel Charette  <mailto:gchare@google.com>

> 	* pph-streamer-in.c (pph_add_bindings_to_namespace): Reverse names
and
> 	namespaces chains.

> 	* g++.dg/pph/c1limits-externalid.cc: Remove pph asm xdiff.
> 	* g++.dg/pph/c1varorder.cc: New.
> 	* g++.dg/pph/c1varorder.h: New.
> 	* g++.dg/pph/pph.map: Add c1varorder.h

OK with a minor comment nit.

http://codereview.appspot.com/4635074/



More information about the Gcc-patches mailing list