diff --git a/src/cheats/relops.pir b/src/cheats/relops.pir index f40e1016347..16fd0989675 100644 --- a/src/cheats/relops.pir +++ b/src/cheats/relops.pir @@ -12,24 +12,6 @@ src/cheats/cmp.pir - Perl6 comparison builtins .namespace [] -.sub '&infix:<==>' :multi(_,_) - .param num a - .param num b - $I0 = iseq a, b - .return ($I0) - # .tailcall '&prefix:?'($I0) -.end - - -.sub '&infix:' :multi(_,_) - .param num a - .param num b - $I0 = isne a, b - .return ($I0) - # .tailcall '&prefix:?'($I0) -.end - - .sub '&infix:<<>' :multi(_,_) .param num a .param num b diff --git a/src/core/operators.pm b/src/core/operators.pm index 919e796125a..768011147d8 100644 --- a/src/core/operators.pm +++ b/src/core/operators.pm @@ -147,6 +147,14 @@ our multi infix:sym($a, $b) { $a.defined ?? $a !! $b } +our multi infix:<==>($a, $b) { + pir::iseq__INN(+$a, +$b) ?? True !! False +} + +our multi infix:($a, $b) { + pir::isne__INN(+$a, +$b) ?? True !! False +} + # XXX Wants to be a macro when we have them. our sub WHAT(\$x) { $x.WHAT