Re: [cxx-conversion] Add Record Builder Class

2013-02-18 Thread Nathan Sidwell
On 02/12/13 19:47, Lawrence Crowl wrote: Add class record_builder to ease construction of records and unions. Use it in some appropriate places. Nathan please review the vxworks changes. config/vxworks.c Replace vxworks_emutls_var_fields() with vxworks_emutls_object_type(). U

Re: [cxx-conversion] Add Record Builder Class

2013-02-15 Thread Gabriel Dos Reis
On Fri, Feb 15, 2013 at 3:04 AM, Richard Biener wrote: > Note that there is no such thing as a "middle-end" or "back-end" type. but we do conceptually have them. -- Gaby

Re: [cxx-conversion] Add Record Builder Class

2013-02-15 Thread Richard Biener
On Thu, Feb 14, 2013 at 8:44 PM, Lawrence Crowl wrote: > On 2/14/13, Richard Biener wrote: >> On Tue, Feb 12, 2013 at 8:47 PM, Lawrence Crowl wrote: >> > Add class record_builder to ease construction of records and unions. Use >> > it >> > in some appropriate places. > >> > tree >> > -def

Re: [cxx-conversion] Add Record Builder Class

2013-02-14 Thread Lawrence Crowl
On 2/14/13, Richard Biener wrote: > On Tue, Feb 12, 2013 at 8:47 PM, Lawrence Crowl wrote: > > Add class record_builder to ease construction of records and unions. Use > > it > > in some appropriate places. > > tree > > -default_emutls_var_fields (tree type, tree *name ATTRIBUTE_UNUSED) >

Re: [cxx-conversion] Add Record Builder Class

2013-02-14 Thread Diego Novillo
On Thu, Feb 14, 2013 at 8:06 AM, Richard Biener wrote: > On Thu, Feb 14, 2013 at 2:01 PM, Diego Novillo wrote: >> On Thu, Feb 14, 2013 at 7:52 AM, Richard Biener >> wrote: >> >>> Because it's otherwise almost unused. No "usual" gimple pass builds >>> up record types. What's the point in introd

Re: [cxx-conversion] Add Record Builder Class

2013-02-14 Thread Richard Biener
On Thu, Feb 14, 2013 at 2:01 PM, Diego Novillo wrote: > On Thu, Feb 14, 2013 at 7:52 AM, Richard Biener > wrote: > >> Because it's otherwise almost unused. No "usual" gimple pass builds >> up record types. What's the point in introducing the abstraction if >> most of the users cannot use it? >

Re: [cxx-conversion] Add Record Builder Class

2013-02-14 Thread Diego Novillo
On Thu, Feb 14, 2013 at 7:52 AM, Richard Biener wrote: > Because it's otherwise almost unused. No "usual" gimple pass builds > up record types. What's the point in introducing the abstraction if > most of the users cannot use it? There may be few users on the gimple side, but you are mixing tw

Re: [cxx-conversion] Add Record Builder Class

2013-02-14 Thread Richard Biener
On Thu, Feb 14, 2013 at 12:56 PM, Diego Novillo wrote: > On Thu, Feb 14, 2013 at 4:26 AM, Richard Biener > wrote: > >> Note that tag_name does not allow the way C++ uses this (it can be >> a TYPE_DECL). >> >> Overall I'm not sure this is a good abstraction unless you manage to >> make the fronten

Re: [cxx-conversion] Add Record Builder Class

2013-02-14 Thread Diego Novillo
On Thu, Feb 14, 2013 at 4:26 AM, Richard Biener wrote: > Note that tag_name does not allow the way C++ uses this (it can be > a TYPE_DECL). > > Overall I'm not sure this is a good abstraction unless you manage to > make the frontends use it. I think that is a mistake. This is a pure gimple faci

Re: [cxx-conversion] Add Record Builder Class

2013-02-14 Thread Richard Biener
On Tue, Feb 12, 2013 at 8:47 PM, Lawrence Crowl wrote: > Add class record_builder to ease construction of records and unions. Use it > in some appropriate places. > > Nathan please review the vxworks changes. > > tree.h > New class record_builder. > > tree.c > Implement record_bui

Re: [cxx-conversion] Add Record Builder Class

2013-02-13 Thread Lawrence Crowl
On 2/13/13, Diego Novillo wrote: > Thanks. The patch is OK for the branch. You can address Nathan's > review after he's back and gets a chance to look at it. > > Let me know when the patch is in. I've got another merge in process. Committed. -- Lawrence Crowl

Re: [cxx-conversion] Add Record Builder Class

2013-02-13 Thread Diego Novillo
Thanks. The patch is OK for the branch. You can address Nathan's review after he's back and gets a chance to look at it. Let me know when the patch is in. I've got another merge in process. Diego.

Re: [cxx-conversion] Add Record Builder Class

2013-02-13 Thread Lawrence Crowl
On 2/13/13, Diego Novillo wrote: > On Tue, Feb 12, 2013 at 2:47 PM, Lawrence Crowl wrote: >> @@ -182,24 +163,9 @@ default_emutls_var_init (tree to, tree d >> static tree >> get_emutls_object_type (void) >> { >> - tree type, type_name, field; >> - >> - type = emutls_object_type; >> - if (typ

Re: [cxx-conversion] Add Record Builder Class

2013-02-13 Thread Diego Novillo
On Tue, Feb 12, 2013 at 2:47 PM, Lawrence Crowl wrote: > @@ -182,24 +163,9 @@ default_emutls_var_init (tree to, tree d > static tree > get_emutls_object_type (void) > { > - tree type, type_name, field; > - > - type = emutls_object_type; > - if (type) > -return type; > - > - emutls_obje