Skip to content

Commit

Permalink
Change !op to generate an explicit call to an infix_prefix_meta_opera…
Browse files Browse the repository at this point in the history
…tor function.
  • Loading branch information
colomon committed Mar 7, 2010
1 parent dee7104 commit df80392
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
14 changes: 5 additions & 9 deletions src/Perl6/Actions.pm
Expand Up @@ -1690,15 +1690,11 @@ method infixish($/) {
if $<infix_prefix_meta_operator> {
my $metaop := ~$<infix_prefix_meta_operator><sym>;
my $sym := ~$<infix><sym>;
my $opsub := "&infix:<$metaop$sym>";
unless %*METAOPGEN{$opsub} {
@BLOCK[0].loadinit.push(
PAST::Op.new( :name('!gen_not_metaop'), $sym,
:pasttype('call') )
);
%*METAOPGEN{$opsub} := 1;
}
make PAST::Op.new( :name($opsub), :pasttype('call') );
my $metasub := "&infix_prefix_meta_operator:<$metaop>";
my $opsub := "&infix:<$sym>";
make PAST::Op.new( :name($metasub),
$opsub,
:pasttype('call') );
}
}

Expand Down
4 changes: 4 additions & 0 deletions src/core/operators.pm
Expand Up @@ -328,3 +328,7 @@ our multi sub infix:<Z>(Iterable $a-iterable, Iterable $b-iterable) {
take $b;
}
}

multi sub infix_prefix_meta_operator:<!>($a, $b, $c) {
!(pir::get_hll_global__CS($a)($b, $c));
}
3 changes: 0 additions & 3 deletions src/old/setting/Operators.pm
Expand Up @@ -369,7 +369,4 @@ multi sub infix:<< >= >>($a, Whatever $b) {
}
}

multi sub infix:<!===>($a, $b) {
!($a === $b);
}
# vim: ft=perl6

0 comments on commit df80392

Please sign in to comment.