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

Issue 6233044: [cxx-conversion] Convert vec.[ch] to C++ [1/3]

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by Diego Novillo
Modified:
11 years, 11 months ago
Reviewers:
richard.guenther, tromey, iant2, Lawrence Crowl, pinskia
CC:
gcc-patches_gcc.gnu.org
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+676 lines, -1108 lines) Patch
M gcc/vec.h View 23 chunks +671 lines, -990 lines 0 comments Download
M gcc/vec.c View 6 chunks +5 lines, -118 lines 0 comments Download

Messages

Total messages: 10
Diego Novillo
This series of 3 patches re-implement vec.[ch] in C++. The main goal of this first ...
11 years, 11 months ago (2012-05-23 19:48:44 UTC) #1
Lawrence Crowl
On 5/23/12, Diego Novillo <dnovillo@google.com> wrote: > OK for cxx-conversion branch? LGTM. -- Lawrence Crowl
11 years, 11 months ago (2012-05-23 21:56:16 UTC) #2
richard.guenther_gmail.com
On Wed, May 23, 2012 at 9:48 PM, Diego Novillo <dnovillo@google.com> wrote: > > This ...
11 years, 11 months ago (2012-05-24 08:16:38 UTC) #3
pinskia_gmail.com
On Thu, May 24, 2012 at 1:16 AM, Richard Guenther <richard.guenther@gmail.com> wrote: > On Wed, ...
11 years, 11 months ago (2012-05-24 08:20:07 UTC) #4
Diego Novillo
On 12-05-24 04:20 , Andrew Pinski wrote: > On Thu, May 24, 2012 at 1:16 ...
11 years, 11 months ago (2012-05-24 14:12:43 UTC) #5
Diego Novillo
On 12-05-24 04:16 , Richard Guenther wrote: > On Wed, May 23, 2012 at 9:48 ...
11 years, 11 months ago (2012-05-24 14:19:09 UTC) #6
Diego Novillo
I have committed these three patches as a single revision r187836 on cxx-conversion. I will ...
11 years, 11 months ago (2012-05-24 14:24:57 UTC) #7
Lawrence Crowl
On 5/24/12, Diego Novillo <dnovillo@google.com> wrote: > On 12-05-24 04:16 , Richard Guenther wrote: >> ...
11 years, 11 months ago (2012-05-24 22:49:52 UTC) #8
tromey_redhat.com
>>>>> "Diego" == Diego Novillo <dnovillo@google.com> writes: Diego> +struct GTY(()) vec_prefix Diego> +{ Diego> + ...
11 years, 11 months ago (2012-05-25 18:27:28 UTC) #9
Diego Novillo
11 years, 11 months ago (2012-05-25 20:06:55 UTC) #10
On 12-05-25 14:27 , Tom Tromey wrote:
>>>>>> "Diego" == Diego Novillo<dnovillo@google.com>  writes:
>
> Diego>  +struct GTY(()) vec_prefix
> Diego>  +{
> Diego>  +  unsigned num;
> Diego>  +  unsigned alloc;
> Diego>  +};
> Diego>  +
> Diego>  +/* Vector type, user visible.  */
> Diego>  +template<typename T>
> Diego>  +struct GTY(()) vec_t
> Diego>  +{
> Diego>  +  vec_prefix prefix;
> Diego>  +  T GTY((length ("%h.prefix.num"))) vec[1];
> Diego>  +};
>
> I'm curious why you didn't use inheritance here.
>
>      template<typename T>
>      struct GTY(()) vec_t : public vec_prefix
>      {
>      ...
>      };

Minimalism.  I was almost obsessed by it with the first patch.  It 
would've required more changes if I didn't make it a POD type.

I will make it into a more standard C++ type in subsequent patches.


Diego.

Sign in to reply to this message.

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