"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/core.c/Order.pm6" between
rakudo-2020.08.2.tar.gz and rakudo-2020.09.tar.gz

About: Rakudo is a compiler for the Perl 6 programming language.

Order.pm6  (rakudo-2020.08.2):Order.pm6  (rakudo-2020.09)
skipping to change at line 31 skipping to change at line 31
} }
multi sub infix:<cmp>(\a, Real:D \b) { multi sub infix:<cmp>(\a, Real:D \b) {
b === Inf b === Inf
?? Less ?? Less
!! b === -Inf !! b === -Inf
?? More ?? More
!! a.Stringy cmp b.Stringy !! a.Stringy cmp b.Stringy
} }
multi sub infix:<cmp>(Real:D \a, Real:D \b) { multi sub infix:<cmp>(Real:D \a, Real:D \b) {
(nqp::istype(a, Rational) && nqp::isfalse(a.denominator)) nqp::istype(a,Rational) && nqp::istype(b,Rational)
|| (nqp::istype(b, Rational) && nqp::isfalse(b.denominator)) ?? a.isNaN || b.isNaN
?? a.Bridge cmp b.Bridge ?? a.Num cmp b.Num
!! a === -Inf || b === Inf !! a <=> b
?? Less !! (nqp::istype(a, Rational) && nqp::isfalse(a.denominator))
!! a === Inf || b === -Inf || (nqp::istype(b, Rational) && nqp::isfalse(b.denominator))
?? a.Bridge cmp b.Bridge
!! a === -Inf || b === Inf
?? Less
!! a === Inf || b === -Inf
?? More ?? More
!! a.Bridge cmp b.Bridge !! a.Bridge cmp b.Bridge
} }
multi sub infix:<cmp>(Int:D \a, Rational:D \b) { multi sub infix:<cmp>(Int:D \a, Rational:D \b) {
a.isNaN || b.isNaN ?? a.Num cmp b.Num !! a <=> b a.isNaN || b.isNaN ?? a.Num cmp b.Num !! a <=> b
} }
multi sub infix:<cmp>(Rational:D \a, Int:D \b) { multi sub infix:<cmp>(Rational:D \a, Int:D \b) {
a.isNaN || b.isNaN ?? a.Num cmp b.Num !! a <=> b a.isNaN || b.isNaN ?? a.Num cmp b.Num !! a <=> b
} }
multi sub infix:<cmp>(Int:D \a, Int:D \b) { multi sub infix:<cmp>(Int:D \a, Int:D \b) {
ORDER(nqp::cmp_I(nqp::decont(a), nqp::decont(b))) ORDER(nqp::cmp_I(nqp::decont(a), nqp::decont(b)))
} }
multi sub infix:<cmp>(int $a, int $b) { multi sub infix:<cmp>(int $a, int $b) {
ORDER(nqp::cmp_i($a, $b)) ORDER(nqp::cmp_i($a, $b))
} }
multi sub infix:<cmp>(Code:D \a, Code:D \b) {
a.name cmp b.name
}
multi sub infix:<cmp>(Code:D \a, \b) {
a.name cmp b.Stringy
}
multi sub infix:<cmp>(\a, Code:D \b) {
a.Stringy cmp b.name
}
multi sub infix:«<=>»(Int:D \a, Int:D \b) { multi sub infix:«<=>»(Int:D \a, Int:D \b) {
ORDER(nqp::cmp_I(nqp::decont(a), nqp::decont(b))) ORDER(nqp::cmp_I(nqp::decont(a), nqp::decont(b)))
} }
multi sub infix:«<=>»(int $a, int $b) { multi sub infix:«<=>»(int $a, int $b) {
ORDER(nqp::cmp_i($a, $b)) ORDER(nqp::cmp_i($a, $b))
} }
# vim: expandtab shiftwidth=4 # vim: expandtab shiftwidth=4
 End of changes. 2 change blocks. 
6 lines changed or deleted 20 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)