[tuples] Accessors for RHS of assignments

Andrew MacLeod amacleod@redhat.com
Wed Jun 20 21:42:00 GMT 2007


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





More information about the Gcc mailing list