Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move infix:<ne>, infix:<!eq>, infix:<!=>, and infix:<!==> into setting.
  • Loading branch information
pmichaud committed Aug 28, 2009
1 parent aab4bf9 commit f351f60
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 34 deletions.
4 changes: 2 additions & 2 deletions build/gen_junction_pir.pl
Expand Up @@ -8,8 +8,8 @@
my @binary = qw(
infix:% infix:div infix:mod
infix:~
infix:== infix:!= infix:< infix:> infix:<= infix:>=
infix:eq infix:ne infix:lt infix:gt infix:le infix:ge
infix:== infix:< infix:> infix:<= infix:>=
infix:eq infix:lt infix:gt infix:le infix:ge
infix:<=> infix:cmp infix:=:=
);

Expand Down
2 changes: 1 addition & 1 deletion build/gen_whatever_pir.pl
Expand Up @@ -7,7 +7,7 @@

my @ops = qw(
infix:% infix:div infix:mod
infix:== infix:!= infix:< infix:> infix:<= infix:>= infix:<=>
infix:== infix:< infix:> infix:<= infix:>= infix:<=>
infix:.. infix:^.. infix:..^ infix:^..^
prefix:+ prefix:? prefix:! prefix:^
);
Expand Down
31 changes: 0 additions & 31 deletions src/builtins/cmp.pir
Expand Up @@ -20,22 +20,6 @@ src/builtins/cmp.pir - Perl6 comparison builtins
.end


.sub 'infix:!==' :multi(_,_)
.param num a
.param num b
$I0 = isne a, b
.tailcall 'prefix:?'($I0)
.end

# Shortcut for infix:!==, so same code
.sub 'infix:!=' :multi(_,_)
.param num a
.param num b
$I0 = isne a, b
.tailcall 'prefix:?'($I0)
.end


.sub 'infix:<' :multi(_,_)
.param num a
.param num b
Expand Down Expand Up @@ -92,21 +76,6 @@ src/builtins/cmp.pir - Perl6 comparison builtins
.tailcall 'prefix:?'($I0)
.end

.sub 'infix:!eq' :multi(_,_)
.param string a
.param string b
$I0 = isne a, b
.tailcall 'prefix:?'($I0)
.end


.sub 'infix:ne' :multi(_,_)
.param string a
.param string b
$I0 = isne a, b
.tailcall 'prefix:?'($I0)
.end


.sub 'infix:lt' :multi(_,_)
.param string a
Expand Down
5 changes: 5 additions & 0 deletions src/setting/Operators.pm
Expand Up @@ -235,4 +235,9 @@ multi sub prefix:<~>(Object $a) {
multi sub prefix:<~>(Multi $a) { $a.name }

multi sub infix:<!=>($a, $b) { !($a == $b) }
multi sub infix:<!==>($a, $b) { !($a == $b) }
multi sub infix:<ne>($a, $b) { !($a eq $b) }
multi sub infix:<!eq>($a, $b) { !($a eq $b) }

# vim: ft=perl6

0 comments on commit f351f60

Please sign in to comment.