On 5/5/11, dnovi...@google.com <dnovi...@google.com> wrote:
> http://codereview.appspot.com/4486042/diff/1/gcc/cp/pph-streamer.h
> File gcc/cp/pph-streamer.h (right):
>
> http://codereview.appspot.com/4486042/diff/1/gcc/cp/pph-streamer.h#newcode152
> gcc/cp/pph-streamer.h:152: for (i = 0; i < c; ++i)
> +#if 0
> +static inline void
> +pph_output_tree_array (pph_stream *stream, tree *a, size_t c, bool
> ref_p)
> +{
> +  size_t i;
>
> Why are you adding this #if0 code?  No apparent reason given that we
> have pph_stream_write_tree_vec.
>
> http://codereview.appspot.com/4486042/diff/1/gcc/cp/pph-streamer.h#newcode338
> gcc/cp/pph-streamer.h:338: size_t i;
> +static inline void
> +pph_input_tree_array (pph_stream *stream, tree *a, size_t c)
> +{
> +  size_t i;
>
> Likewise.

The object I thought I needed was an array, not a vec.  I decided
that writing that array was not helpful, and disabled the code.
I archived the tool here in case I need later.

> http://codereview.appspot.com/4486042/diff/1/gcc/cp/pph-streamer.h#newcode245
> gcc/cp/pph-streamer.h:245: tree t;
> #if 0
> +static inline void
> +pph_output_tree_VEC (pph_stream *stream, VEC(tree,gc) *v, bool ref_p)
> +{
> +  tree t;
>
> Another one of the same?
>
> http://codereview.appspot.com/4486042/diff/1/gcc/cp/pph-streamer.h#newcode355
> gcc/cp/pph-streamer.h:355: size_t i;
> +#if 0
> +static inline void
> +pph_input_tree_VEC (pph_stream *stream, VEC(tree,gc) *v)
> +{
> +  size_t i;
>
> Likewise.

The routines will eventually do different tasks.  The writes
may be redundant but the reads are not.  In particular, the use
of pph_stream_read_tree_vec overwrites the tree_vec variable.
We really want to do a merge.  I can get away with the overwrite
only with the single-leading pph file.  When we do more than one
PPH file, I will need something like these routines back, so these
have been archived for future code.

> http://codereview.appspot.com/4486042/

-- 
Lawrence Crowl

Reply via email to