On Tue, Jan 20, 2009 at 09:33:17AM -0800, chromatic wrote:
> On Tuesday 20 January 2009 07:27:53 Patrick R. Michaud wrote:
> 
> > On Mon, Jan 19, 2009 at 08:35:26PM -0800, chromatic via RT wrote:
> 
> > > I've done most of this in r35787, but we can't get rid of n_neg entirely
> > > until someone updates PCT and NQP not to use it for prefix:- rules.  I
> > > poked at that, but couldn't make them work.
> > What's the replacement opcode for n_neg ?
> 
> If we remove n_neg, the replacement is likely a two-step operation:
> 
>       clone $P1, $P2
>       neg $P1

Please, not this -- it's terribly inconsistent.  

When we got rid of the other n_* opcodes, their non-n_* counterparts 
were given the "create a new PMC" semantics that the n_* version had.  
We should do the same for n_neg, such that what was previously

    n_add $P0, $P1, $P2    # construct $P0 as sum of $P1 and $P2
    n_neg $P0, $P1         # construct $P0 as negation of $P1

is now

    add $P0, $P1, $P2      # construct $P0 as sum of $P1 and $P2
    neg $P0, $P1           # construct $P0 as negation of $P1

Pm

Reply via email to