Permalink
Browse files

[common] Replace explicit multi-dispatcher ops with a proto with a pl…

…ain body of *.
  • Loading branch information...
1 parent cac2fa6 commit 413bae8e277e66468edc61f221c71040b10a0684 @jnthn committed Oct 30, 2010
Showing with 7 additions and 21 deletions.
  1. +7 −21 common/NQP/NQPSetting.pm
View
@@ -151,19 +151,15 @@ knowhow NQPCode is repr('RakudoCodeRef') {
## XXX Need coercive Any fallbacks too.
-proto sub &infix:<==>($x, $y) {
- nqp::multi_dispatch_over_lexical_candidates();
-}
+proto sub &infix:<==>($x, $y) { * }
multi sub &infix:<==>(NQPInt $x, NQPInt $y) {
nqp::equal_ints($x, $y)
}
multi sub &infix:<==>(NQPNum $x, NQPNum $y) {
nqp::equal_nums($x, $y)
}
-proto sub &infix:<!=>($x, $y) {
- nqp::multi_dispatch_over_lexical_candidates();
-}
+proto sub &infix:<!=>($x, $y) { * }
multi sub &infix:<!=>(NQPInt $x, NQPInt $y) {
nqp::logical_not_int(nqp::equal_ints($x, $y))
}
@@ -199,37 +195,27 @@ sub &prefix:<+>($x) {
$x.Numeric
}
-proto sub &infix:<+>($x, $y) {
- nqp::multi_dispatch_over_lexical_candidates();
-}
+proto sub &infix:<+>($x, $y) { * }
multi sub &infix:<+>(NQPInt $x, NQPInt $y) {
nqp::add_int($x, $y);
}
-proto sub &infix:<->($x, $y) {
- nqp::multi_dispatch_over_lexical_candidates();
-}
+proto sub &infix:<->($x, $y) { * }
multi sub &infix:<->(NQPInt $x, NQPInt $y) {
nqp::sub_int($x, $y);
}
-proto sub &infix:<*>($x, $y) {
- nqp::multi_dispatch_over_lexical_candidates();
-}
+proto sub &infix:<*>($x, $y) { * }
multi sub &infix:<*>(NQPInt $x, NQPInt $y) {
nqp::mul_int($x, $y);
}
-proto sub &infix:</>($x, $y) {
- nqp::multi_dispatch_over_lexical_candidates();
-}
+proto sub &infix:</>($x, $y) { * }
multi sub &infix:</>(NQPInt $x, NQPInt $y) {
nqp::div_int($x, $y);
}
-proto sub &infix:<%>($x, $y) {
- nqp::multi_dispatch_over_lexical_candidates();
-}
+proto sub &infix:<%>($x, $y) { * }
multi sub &infix:<%>(NQPInt $x, NQPInt $y) {
nqp::mod_int($x, $y);
}

0 comments on commit 413bae8

Please sign in to comment.