This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tuples] Accessors for RHS of assignments
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: Aldy Hernandez <aldyh at redhat dot com>, Christopher Matthews <chrismatthews at google dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 20 Jun 2007 14:40:56 -0400
- Subject: Re: [tuples] Accessors for RHS of assignments
- References: <46796F96.1080407@google.com>
On Wed, 2007-06-20 at 14:19 -0400, Diego Novillo wrote:
>
> gs_assign_unary_rhs (gs) <- Access the only operand on RHS
> gs_assign_binary_rhs1 (gs) <- Access the 1st RHS operand
> gs_assign_binary_rhs2 (gs) <- Access the 2nd RHS operand
>
> And the corresponding _set functions.
>
> I then managed to half convince myself that it'd be better to have a
> single gs_assign_rhs() accessor with a 'which' parameter. After
> implementing that, I think I hate it. Particularly since this 'which'
> parameter is just a number (0 or 1). It could be a mnemonic, but it
> would still be annoying.
>
> So, I'm thinking of going back to the way it was before, but it is not
> optimal. Do people feel strongly over one or the other?
I prefer something like the original mechanism, no flags or parameters.
I find that more natural in an interface. flags and parameters are old
school :-)
Andrew