Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move infix:<leg> to the setting.
  • Loading branch information
mathw authored and moritz committed Jul 5, 2009
1 parent 252399e commit 0e8a86a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build/gen_junction_pir.pl
Expand Up @@ -12,7 +12,7 @@
infix:~
infix:== infix:!= infix:< infix:> infix:<= infix:>=
infix:eq infix:ne infix:lt infix:gt infix:le infix:ge
infix:<=> infix:leg infix:cmp infix:=:=
infix:<=> infix:cmp infix:=:=
);

my @unary = qw(
Expand Down
10 changes: 0 additions & 10 deletions src/builtins/cmp.pir
Expand Up @@ -150,16 +150,6 @@ src/builtins/cmp.pir - Perl6 comparison builtins
.end


.sub 'infix:leg' :multi(_,_)
.param string a
.param string b
$I0 = cmp a, b
## Don't use a tailcall here due to RT#56448
$P0 = 'infix:<=>'($I0, 0)
.return ($P0)
.end


.sub 'infix:===' :multi(_,_)
.param pmc a
.param pmc b
Expand Down
4 changes: 4 additions & 0 deletions src/setting/Operators.pm
Expand Up @@ -48,4 +48,8 @@ multi sub infix:<minmax>(@a, @b) {
(@a[0] min @b[0], @a[1] max @b[1]);
}

multi sub infix:<leg>($a, $b) {
~$a cmp ~$b;
}

# vim: ft=perl6

0 comments on commit 0e8a86a

Please sign in to comment.