Re: Simple trinary ops?

2004-06-17 Thread Steve Fink
On Jun-16, Dan Sugalski wrote: At 8:24 PM +0200 6/16/04, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: I'm wondering if it'd be useful enough to be worthwhile to have non-flowcontrol min/max ops. Something like: min P1, P2, P3 max P1, P2, P3 Which cmp

Simple trinary ops?

2004-06-16 Thread Dan Sugalski
I'm wondering if it'd be useful enough to be worthwhile to have non-flowcontrol min/max ops. Something like: min P1, P2, P3 max P1, P2, P3 where P1 ends up with the lesser (or greater) of P2 and P3. On the one hand this'd make some of the code I'm generating now simpler, but on the other

Re: Simple trinary ops?

2004-06-16 Thread Brent 'Dax' Royal-Gordon
Dan Sugalski wrote: min P1, P2, P3 max P1, P2, P3 Opinions? Subroutine, man, subroutine. NCI if you need it to be fast. -- Brent Dax Royal-Gordon [EMAIL PROTECTED] Perl and Parrot hacker Oceania has always been at war with Eastasia.

Re: Simple trinary ops?

2004-06-16 Thread Dan Sugalski
At 10:08 AM -0700 6/16/04, Brent 'Dax' Royal-Gordon wrote: Dan Sugalski wrote: min P1, P2, P3 max P1, P2, P3 Opinions? Subroutine, man, subroutine. NCI if you need it to be fast. Feh on a subroutine--it's three or four ops with a few branches. Which was the point--it eliminates the

Re: Simple trinary ops?

2004-06-16 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: I'm wondering if it'd be useful enough to be worthwhile to have non-flowcontrol min/max ops. Something like: min P1, P2, P3 max P1, P2, P3 Which cmp operation of the three we have? I smell opcode bloat. On the one hand this'd make some of the