Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…ain body of *.
  • Loading branch information...
commit 413bae8e277e66468edc61f221c71040b10a0684 1 parent cac2fa6
@jnthn authored
Showing with 7 additions and 21 deletions.
  1. +7 −21 common/NQP/NQPSetting.pm
View
28 common/NQP/NQPSetting.pm
@@ -151,9 +151,7 @@ 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)
}
@@ -161,9 +159,7 @@ 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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.