Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Revert "Change !op to generate an explicit call to an infix_prefix_me…
…ta_operator function." This goes back to the first implementation of !op, which now works and is probably a bit more efficient than the second implementation.

This reverts commit df80392.

Conflicts:

	src/core/operators.pm
  • Loading branch information
colomon committed Mar 15, 2010
1 parent c29d389 commit 3bc40d3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
14 changes: 9 additions & 5 deletions src/Perl6/Actions.pm
Expand Up @@ -1916,11 +1916,15 @@ method infixish($/) {
if $<infix_prefix_meta_operator> {
my $metaop := ~$<infix_prefix_meta_operator><sym>;
my $sym := ~$<infix><sym>;
my $metasub := "&infix_prefix_meta_operator:<$metaop>";
my $opsub := "&infix:<$sym>";
make PAST::Op.new( :name($metasub),
$opsub,
:pasttype('call') );
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') );
}
}

Expand Down
9 changes: 6 additions & 3 deletions src/core/operators.pm
Expand Up @@ -412,9 +412,12 @@ our multi sub infix:<Z>(Iterable $a-iterable, Iterable $b-iterable) {
}
}

multi sub infix_prefix_meta_operator:<!>($a, $b, $c) {
!(pir::get_hll_global__CS($a)($b, $c));
}
# Eliminate use of this one, but keep the pir around for
# the moment, as it may come in handy elsewhere.
#
# multi sub infix_prefix_meta_operator:<!>($a, $b, $c) {
# !(pir::get_hll_global__CS($a)($b, $c));
# }

# CHEAT: These should be automatically generated by the grammar,
# I think. But this is a quick fix to get some basic functionality
Expand Down
3 changes: 3 additions & 0 deletions src/old/setting/Operators.pm
Expand Up @@ -369,4 +369,7 @@ multi sub infix:<< >= >>($a, Whatever $b) {
}
}

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

0 comments on commit 3bc40d3

Please sign in to comment.