[perl #58410] [TODO] Deprecate n_* variants of the math opcodes
Will Coleda via RT
parrotbug-followup at parrotcode.org
Sat Apr 4 00:54:50 UTC 2009
On Tue Jan 20 10:01:32 2009, chromatic at wgz.org wrote:
> On Tuesday 20 January 2009 09:50:56 Patrick R. Michaud wrote:
>
> > > > 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
>
> Hm, now that I look closer, this already exists and works that way.
> Thus the
> replacement is to use:
>
> neg $P0, $P1
>
> -- c
>
All the n_ variants are gone now. Resolving ticket.
--
Will "Coke" Coleda
More information about the parrot-dev
mailing list