Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/core/Any.pm b/src/core/Any.pm
- index 59787a6..cf9e0c8 100644
- --- a/src/core/Any.pm
- +++ b/src/core/Any.pm
- @@ -14,11 +14,10 @@ my class Any {
- method join($separator = ' ') {
- my $list = (self,).flat.eager;
- my Mu $rsa := pir::new__Ps('ResizableStringArray');
- - pir::push__vPS($rsa, pir::repr_unbox_str__SP($list.shift.Stringy))
- + pir::push__vPS($rsa, nqp::unbox_s($list.shift.Stringy))
- while $list.gimme(0);
- pir::push__vPS($rsa, '...') if $list.infinite;
- - pir::perl6_box_str__PS(
- - pir::join(pir::repr_unbox_str__SP($separator.Stringy), $rsa))
- + nqp::p6box_s(pir::join(nqp::unbox_s($separator.Stringy), $rsa))
- }
- method map($block) is rw {
- diff --git a/src/core/Attribute.pm b/src/core/Attribute.pm
- index ea1e5ee..95dec63 100644
- --- a/src/core/Attribute.pm
- +++ b/src/core/Attribute.pm
- @@ -11,7 +11,7 @@ my class Attribute {
- pir::getattribute__PPPs(
- pir::perl6_decontainerize__PP($self),
- $dcpkg,
- - pir::repr_unbox_str__SP($name))
- + nqp::unbox_s($name))
- }
- !!
- method (Mu $self:) {
- @@ -19,10 +19,10 @@ my class Attribute {
- pir::getattribute__PPPs(
- pir::perl6_decontainerize__PP($self),
- $dcpkg,
- - pir::repr_unbox_str__SP($name)))
- + nqp::unbox_s($name)))
- };
- $package.HOW.add_method($package, pir::substr__SSI(
- - pir::repr_unbox_str__SP($name), pir::repr_unbox_int__IP(2)),
- + nqp::unbox_s($name), nqp::unbox_i(2)),
- $meth);
- }
- }
- diff --git a/src/core/Bool.pm b/src/core/Bool.pm
- index 3c60d1f..c62631d 100644
- --- a/src/core/Bool.pm
- +++ b/src/core/Bool.pm
- @@ -24,6 +24,6 @@ multi prefix:<so>(Mu \$a) { $a.Bool }
- # XXX These should use Bool::True and Bool::False eventually.
- proto prefix:<!>(|$) { *}
- -multi prefix:<!>(Bool \$a) { pir::perl6_booleanize__PI($a ?? 0 !! 1) }
- -multi prefix:<!>(Mu \$a) { pir::perl6_booleanize__PI($a.Bool ?? 0 !! 1) }
- +multi prefix:<!>(Bool \$a) { nqp::p6bool($a ?? 0 !! 1) }
- +multi prefix:<!>(Mu \$a) { nqp::p6bool($a.Bool ?? 0 !! 1) }
- diff --git a/src/core/Cool.pm b/src/core/Cool.pm
- index abb560b..ca85200 100644
- --- a/src/core/Cool.pm
- +++ b/src/core/Cool.pm
- @@ -1,12 +1,10 @@
- my class Cool {
- method bytes() {
- - pir::perl6_box_int__PI(
- - pir::bytelength__IS(pir::repr_unbox_str__SP(self.Str)));
- + nqp::p6box_i(pir::bytelength__IS(nqp::unbox_s(self.Str)));
- }
- method chars() {
- - pir::perl6_box_int__PI(
- - pir::length__IS(pir::repr_unbox_str__SP(self.Str)));
- + nqp::p6box_i(pir::length__IS(nqp::unbox_s(self.Str)));
- }
- method substr($start as Int, $length?) {
- @@ -24,22 +22,18 @@ my class Cool {
- # return Mu;
- #}
- - pir::perl6_box_str__PS(pir::substr(
- - pir::repr_unbox_str__SP($str),
- - pir::repr_unbox_int__IP($start),
- - pir::repr_unbox_int__IP($len)));
- + nqp::p6box_s(pir::substr(
- + nqp::unbox_s($str),
- + nqp::unbox_i($start),
- + nqp::unbox_i($len)));
- }
- method uc() {
- - pir::perl6_box_str__PS(pir::upcase__SS(
- - pir::repr_unbox_str__SP(self.Str)
- - ));
- + nqp::p6box_s(pir::upcase__SS(nqp::unbox_s(self.Str)))
- }
- method lc() {
- - pir::perl6_box_str__PS(pir::downcase__SS(
- - pir::repr_unbox_str__SP(self.Str)
- - ));
- + nqp::p6box_s(pir::downcase__SS(nqp::unbox_s(self.Str)))
- }
- method ucfirst() {
- @@ -53,21 +47,19 @@ my class Cool {
- }
- method ord() {
- - pir::perl6_box_int__PI(pir::ord__IS(pir::repr_unbox_str__SP(self.Str)));
- + nqp::p6box_i(pir::ord__IS(nqp::unbox_s(self.Str)))
- }
- method flip() {
- - pir::perl6_box_str__PS(
- - pir::box__PS(pir::repr_unbox_str__SP(self.Str)).reverse
- - );
- + nqp::p6box_s(pir::box__PS(nqp::unbox_s(self.Str)).reverse)
- }
- proto method index(|$) {*}
- multi method index(Cool \$needle, Cool $pos = 0) {
- - my $result := pir::perl6_box_int__PI(pir::index__ISSI(
- - pir::repr_unbox_str__SP(self.Str),
- - pir::repr_unbox_str__SP($needle.Str),
- - pir::repr_unbox_int__IP($pos.Int)
- + my $result := nqp::p6box_i(pir::index__ISSI(
- + nqp::unbox_s(self.Str),
- + nqp::unbox_s($needle.Str),
- + nqp::unbox_i($pos.Int)
- ));
- # TODO: fail() instead of returning Str
- $result < 0 ?? Str !! $result;
- @@ -75,10 +67,10 @@ my class Cool {
- proto method rindex(|$) {*}
- multi method rindex(Cool \$needle, Cool $pos = self.chars) {
- - my $result := pir::perl6_box_int__PI(
- - pir::box__PS(pir::repr_unbox_str__SP(self.Str)).reverse_index(
- - pir::repr_unbox_str__SP($needle.Str),
- - pir::repr_unbox_int__IP($pos.Int)
- + my $result := nqp::p6box_i(
- + pir::box__PS(nqp::unbox_s(self.Str)).reverse_index(
- + nqp::unbox_s($needle.Str),
- + nqp::unbox_i($pos.Int)
- )
- );
- # TODO: fail() instead of returning Str
- diff --git a/src/core/EnumMap.pm b/src/core/EnumMap.pm
- index c87fb96..d7bdde5 100644
- --- a/src/core/EnumMap.pm
- +++ b/src/core/EnumMap.pm
- @@ -3,9 +3,9 @@ my class EnumMap {
- # has $!storage; # Parrot Hash PMC of key->value mappings
- method exists(Str \$key) {
- - pir::perl6_booleanize__PI(
- + nqp::p6bool(
- pir::defined($!storage)
- - && pir::exists__IQs($!storage, pir::repr_unbox_str__SP($key))
- + && pir::exists__IQs($!storage, nqp::unbox_s($key))
- )
- }
- @@ -28,7 +28,7 @@ my class EnumMap {
- method at_key(Str \$key) {
- self.exists($key)
- - ?? pir::set__PQs($!storage, pir::repr_unbox_str__SP($key))
- + ?? pir::set__PQs($!storage, nqp::unbox_s($key))
- !! Any
- }
- @@ -37,7 +37,7 @@ my class EnumMap {
- pir::defined($!storage) ||
- pir::setattribute__vPPsP(self, EnumMap, '$!storage',
- pir::new__Ps('Hash'));
- - pir::set__2QsP($!storage, pir::repr_unbox_str__SP($key), $value)
- + pir::set__2QsP($!storage, nqp::unbox_s($key), $value)
- }
- }
- diff --git a/src/core/GatherIter.pm b/src/core/GatherIter.pm
- index 45dec94..1d03db9 100644
- --- a/src/core/GatherIter.pm
- +++ b/src/core/GatherIter.pm
- @@ -29,7 +29,7 @@ class GatherIter is Iterator {
- $P2 = getattribute $P0, $P1, '$!coro'
- %r = $P2()
- };
- - $end = pir::perl6_booleanize__PI(pir::isnull__IP($parcel));
- + $end = nqp::p6bool(pir::isnull__IP($parcel));
- pir::push__vPP($rpa, $parcel) unless $end;
- $n = $n - 1;
- }
- diff --git a/src/core/Int.pm b/src/core/Int.pm
- index efbad91..25248e5 100644
- --- a/src/core/Int.pm
- +++ b/src/core/Int.pm
- @@ -1,21 +1,21 @@
- my class Int {
- method Bool() {
- - pir::perl6_booleanize__PI(
- - pir::isne__III(pir::repr_unbox_int__IP(self), pir::repr_unbox_int__IP(0)))
- + nqp::p6bool(
- + nqp::isne_i(nqp::unbox_i(self), nqp::unbox_i(0)))
- }
- method Int() { self }
- multi method Str(Int:D:) {
- - pir::perl6_box_str__PS(pir::repr_unbox_int__IP(self));
- + nqp::p6box_s(nqp::unbox_i(self));
- }
- method Num() {
- - pir::perl6_box_num__PN(pir::repr_unbox_int__IP(self));
- + nqp::p6box_n(nqp::unbox_i(self));
- }
- method abs() {
- - pir::perl6_box_int__PI(pir::abs__II(pir::repr_unbox_int__IP(self)));
- + nqp::p6box_i(nqp::abs_i(nqp::unbox_i(self)));
- }
- method Bridge() {
- @@ -23,7 +23,7 @@ my class Int {
- }
- method chr() {
- - pir::perl6_box_str__PS(pir::chr(pir::repr_unbox_int__IP(self)));
- + nqp::p6box_s(pir::chr(nqp::unbox_i(self)));
- }
- proto method succ(|$) {*}
- @@ -126,43 +126,26 @@ multi infix:«>=»(Int \$a, Int \$b) {
- }
- multi infix:<+|>(Int \$a, Int \$b) {
- - pir::perl6_box_int__PI(pir::bor__III(
- - pir::repr_unbox_int__ip($a),
- - pir::repr_unbox_int__ip($b)
- - ));
- + nqp::p6box_i(pir::bor__III(nqp::unbox_i($a), nqp::unbox_i($b)))
- }
- multi infix:<+&>(Int \$a, Int \$b) {
- - pir::perl6_box_int__PI(pir::band__III(
- - pir::repr_unbox_int__ip($a),
- - pir::repr_unbox_int__ip($b)
- - ));
- + nqp::p6box_i(pir::band__III(nqp::unbox_i($a), nqp::unbox_i($b)))
- }
- multi infix:<+^>(Int \$a, Int \$b) {
- - pir::perl6_box_int__PI(pir::bxor__III(
- - pir::repr_unbox_int__ip($a),
- - pir::repr_unbox_int__ip($b)
- - ));
- + nqp::p6box_i(pir::bxor__III(nqp::unbox_i($a), nqp::unbox_i($b)))
- }
- multi infix:«+<»(Int \$a, Int \$b) {
- - pir::perl6_box_int__PI(pir::shl__III(
- - pir::repr_unbox_int__ip($a),
- - pir::repr_unbox_int__ip($b)
- - ));
- + nqp::p6box_i(pir::shl__III(nqp::unbox_i($a), nqp::unbox_i($b)))
- }
- multi infix:«+>»(Int \$a, Int \$b) {
- - pir::perl6_box_int__PI(pir::shr__III(
- - pir::repr_unbox_int__ip($a),
- - pir::repr_unbox_int__ip($b)
- - ));
- + nqp::p6box_i(pir::shr__III(nqp::unbox_i($a), nqp::unbox_i($b)))
- }
- multi prefix:<+^>(Int \$a) {
- - pir::perl6_box_int__PI(pir::bnot__II(
- - pir::repr_unbox_int__ip($a)
- - ));
- + nqp::p6box_i(pir::bnot__II(nqp::unbox_i($a)))
- }
- diff --git a/src/core/List.pm b/src/core/List.pm
- index 174a23f..e7184fa 100644
- --- a/src/core/List.pm
- +++ b/src/core/List.pm
- @@ -16,7 +16,7 @@ class List {
- method at_pos(\$pos) {
- self.exists($pos)
- - ?? pir::set__PQi($!items, pir::repr_unbox_int__IP($pos))
- + ?? pir::set__PQi($!items, nqp::unbox_i($pos))
- !! Mu
- }
- @@ -26,13 +26,12 @@ class List {
- # Get as many elements as we can. If gimme stops before
- # reaching the end of the list, assume the list is infinite.
- my $n = self.gimme(*);
- - $!nextiter.defined ?? pir::perl6_box_num__PN('Inf') !! $n
- + $!nextiter.defined ?? nqp::p6box_n('Inf') !! $n
- }
- method exists(\$pos) {
- self.gimme($pos + 1);
- - pir::perl6_booleanize__PI(
- - pir::exists__IQI($!items, pir::repr_unbox_int__IP($pos)))
- + nqp::p6bool(pir::exists__IQI($!items, nqp::unbox_i($pos)))
- }
- method flat() {
- @@ -45,14 +44,14 @@ class List {
- pir::setattribute__3PPsP(self, List, '$!items', pir::new__Ps('ResizablePMCArray'));
- # loop through iterators until we have at least $n elements
- - my $count = pir::perl6_box_int__PI(pir::elements($!items));
- + my $count = nqp::p6box_i(pir::elements($!items));
- my $eager = Whatever.ACCEPTS($n);
- while $!nextiter.defined && ($eager
- ?? !$!nextiter.infinite
- !! ($count < $n)) {
- $!nextiter.reify($eager ?? Whatever !! $n - $count);
- pir::setattribute__vPPsP(self, List, '$!nextiter', $!nextiter.nextiter);
- - $count = pir::perl6_box_int__PI(pir::elements($!items));
- + $count = nqp::p6box_i(pir::elements($!items));
- }
- # return the number of elements we have now
- @@ -100,7 +99,7 @@ class List {
- }
- method STORE_AT_POS(\$pos, Mu \$v) {
- - pir::set__1QiP($!items, pir::repr_unbox_int__IP($pos), $v)
- + pir::set__1QiP($!items, nqp::unbox_i($pos), $v)
- }
- method RPA() {
- diff --git a/src/core/Mu.pm b/src/core/Mu.pm
- index 357b823..a84b4ca 100644
- --- a/src/core/Mu.pm
- +++ b/src/core/Mu.pm
- @@ -5,11 +5,11 @@ my class Mu {
- proto method ACCEPTS(|$) { * }
- multi method ACCEPTS(Mu:U: \$topic) {
- - pir::perl6_booleanize__PI(pir::type_check__IPP($topic, self))
- + nqp::p6bool(pir::type_check__IPP($topic, self))
- }
- method WHERE() {
- - pir::perl6_box_int__PI(pir::get_addr__IP(self))
- + nqp::p6box_i(pir::get_addr__IP(self))
- }
- method Bool() {
- @@ -17,7 +17,7 @@ my class Mu {
- }
- method defined() {
- - pir::perl6_booleanize__PI(pir::repr_defined__IP(self))
- + nqp::p6bool(pir::repr_defined__IP(self))
- }
- method CREATE() {
- @@ -63,7 +63,7 @@ sub DUMP(|$) {
- my Mu $topic := pir::shift__PP($args);
- if pir::isnull__IP($topic) { '(null)' }
- elsif pir::isa__IPs($topic, 'ResizablePMCArray') {
- - my $s = 'RPA<' ~ pir::perl6_box_str__Ps(pir::get_addr__IP($topic)) ~ '>(';
- + my $s = 'RPA<' ~ nqp::p6box_s(pir::get_addr__IP($topic)) ~ '>(';
- my $t = '';
- $topic := pir::clone__PP($topic);
- while $topic {
- diff --git a/src/core/Num.pm b/src/core/Num.pm
- index cb023d2..700d28d 100644
- --- a/src/core/Num.pm
- +++ b/src/core/Num.pm
- @@ -2,19 +2,19 @@
- # XXX: Temporary definition of $Inf and $NaN until we have constants available
- # constant Inf = ...
- # constant NaN = ...
- -my $Inf = pir::perl6_box_num__PN(pir::set__Ns('Inf'));
- -my $NaN = pir::perl6_box_num__PN(pir::set__Ns('NaN'));
- +my $Inf = nqp::p6box_n(pir::set__Ns('Inf'));
- +my $NaN = nqp::p6box_n(pir::set__Ns('NaN'));
- my class Num {
- method Num() { self }
- method Bridge() { self }
- method Int() {
- - pir::perl6_box_int__PI(pir::repr_unbox_num__NP(self));
- + nqp::p6box_i(nqp::unbox_n(self));
- }
- multi method Str(Num:D:) {
- - pir::perl6_box_str__PS(pir::repr_unbox_num__NP(self));
- + nqp::p6box_s(nqp::unbox_n(self));
- }
- proto method succ(|$) {*}
- @@ -30,12 +30,12 @@ my class Num {
- }
- method abs() {
- - pir::perl6_box_num__PN(pir::abs__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(nqp::abs_n(nqp::unbox_n(self)));
- }
- proto method log(|$) {*}
- multi method log() {
- - pir::perl6_box_num__PN(pir::ln__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(pir::ln__NN(nqp::unbox_n(self)));
- }
- multi method log(Num \$base) {
- self.log() / $base.log();
- @@ -43,67 +43,67 @@ my class Num {
- proto method sqrt(|$) {*}
- multi method sqrt() {
- - pir::perl6_box_num__PN(pir::sqrt__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(pir::sqrt__NN(nqp::unbox_n(self)));
- }
- method rand() {
- - pir::perl6_box_num__PN(pir::rand__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(pir::rand__NN(nqp::unbox_n(self)));
- }
- method ceil() {
- - pir::perl6_box_num__PN(pir::ceil__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(pir::ceil__NN(nqp::unbox_n(self)));
- }
- method floor() {
- - pir::perl6_box_num__PN(pir::floor__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(pir::floor__NN(nqp::unbox_n(self)));
- }
- proto method sin(|$) {*}
- multi method sin() {
- - pir::perl6_box_num__PN(pir::sin__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(pir::sin__NN(nqp::unbox_n(self)));
- }
- proto method asin(|$) {*}
- multi method asin() {
- - pir::perl6_box_num__PN(pir::asin__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(pir::asin__NN(nqp::unbox_n(self)));
- }
- proto method cos(|$) {*}
- multi method cos() {
- - pir::perl6_box_num__PN(pir::cos__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(pir::cos__NN(nqp::unbox_n(self)));
- }
- proto method acos(|$) {*}
- multi method acos() {
- - pir::perl6_box_num__PN(pir::acos__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(pir::acos__NN(nqp::unbox_n(self)));
- }
- proto method tan(|$) {*}
- multi method tan() {
- - pir::perl6_box_num__PN(pir::tan__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(pir::tan__NN(nqp::unbox_n(self)));
- }
- proto method atan(|$) {*}
- multi method atan() {
- - pir::perl6_box_num__PN(pir::atan__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(pir::atan__NN(nqp::unbox_n(self)));
- }
- proto method sec(|$) {*}
- multi method sec() {
- - pir::perl6_box_num__PN(pir::sec__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(pir::sec__NN(nqp::unbox_n(self)));
- }
- proto method asec(|$) {*}
- multi method asec() {
- - pir::perl6_box_num__PN(pir::asec__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(pir::asec__NN(nqp::unbox_n(self)));
- }
- proto method sinh(|$) {*}
- multi method sinh() {
- - pir::perl6_box_num__PN(pir::sinh__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(pir::sinh__NN(nqp::unbox_n(self)));
- }
- proto method cosh(|$) {*}
- multi method cosh() {
- - pir::perl6_box_num__PN(pir::cosh__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(pir::cosh__NN(nqp::unbox_n(self)));
- }
- proto method tanh(|$) {*}
- multi method tanh() {
- - pir::perl6_box_num__PN(pir::tanh__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(pir::tanh__NN(nqp::unbox_n(self)));
- }
- proto method sech(|$) {*}
- multi method sech() {
- - pir::perl6_box_num__PN(pir::sech__NN(pir::repr_unbox_num__NP(self)));
- + nqp::p6box_n(pir::sech__NN(nqp::unbox_n(self)));
- }
- }
- diff --git a/src/core/Parameter.pm b/src/core/Parameter.pm
- index 1588f24..cf1d366 100644
- --- a/src/core/Parameter.pm
- +++ b/src/core/Parameter.pm
- @@ -23,7 +23,7 @@ my class Parameter {
- }
- method positional() {
- - pir::perl6_booleanize__PI(
- + nqp::p6bool(
- ($!flags +& ($SIG_ELEM_SLURPY_POS +| $SIG_ELEM_SLURPY_NAMED)) == 0 &&
- pir::isnull__IP($!named_names)
- )
- diff --git a/src/core/Str.pm b/src/core/Str.pm
- index 3f8a73b..57020d2 100644
- --- a/src/core/Str.pm
- +++ b/src/core/Str.pm
- @@ -4,11 +4,11 @@ my class Str {
- multi method Str(Str:D:) { self }
- method Int() {
- - pir::perl6_box_int__PI(pir::repr_unbox_str__SP(self));
- + nqp::p6box_i(nqp::unbox_s(self));
- }
- method Num() {
- - pir::perl6_box_num__PN(pir::repr_unbox_str__SP(self));
- + nqp::p6box_n(nqp::unbox_s(self));
- }
- method Numeric() { self.Num }
- @@ -21,94 +21,56 @@ my class Str {
- }
- multi infix:<cmp>(Str \$a, Str \$b) {
- - pir::perl6_box_int__PI(
- - pir::cmp__ISS(
- - pir::repr_unbox_str__SP($a),
- - pir::repr_unbox_str__SP($b)))
- + nqp::p6box_i(pir::cmp__ISS(nqp::unbox_s($a), nqp::unbox_s($b)))
- }
- proto infix:<x>(|$) {*}
- multi infix:<x>(Str $s, Int $repetition) {
- - pir::perl6_box_str__PS(
- - pir::repeat__SSI(
- - pir::repr_unbox_str__SP($s),
- - pir::repr_unbox_int__IP($repetition),
- - )
- - );
- + nqp::p6box_s(pir::repeat__SSI(nqp::unbox_s($s), nqp::unbox_i($repetition)))
- }
- multi infix:<x>($s, $repetition) { $s.Stringy x $repetition.Numeric }
- multi prefix:<~>(Str \$a) { $a }
- multi infix:<~>(Str \$a, Str \$b) {
- - pir::perl6_box_str__PS(
- - pir::concat__SSS(
- - pir::repr_unbox_str__SP($a),
- - pir::repr_unbox_str__SP($b)))
- + nqp::p6box_s(pir::concat__SSS(nqp::unbox_s($a), nqp::unbox_s($b)))
- }
- multi infix:<eq>(Str \$a, Str \$b) {
- - pir::perl6_booleanize__PI(
- - pir::iseq__ISS(
- - pir::repr_unbox_str__SP($a),
- - pir::repr_unbox_str__SP($b)))
- + nqp::p6bool(pir::iseq__ISS(nqp::unbox_s($a), nqp::unbox_s($b)))
- }
- multi infix:<ne>(Str \$a, Str \$b) {
- - pir::perl6_booleanize__PI(
- - pir::isne__ISS(
- - pir::repr_unbox_str__SP($a),
- - pir::repr_unbox_str__SP($b)))
- + nqp::p6bool(pir::isne__ISS(nqp::unbox_s($a), nqp::unbox_s($b)))
- }
- multi infix:<lt>(Str \$a, Str \$b) {
- - pir::perl6_booleanize__PI(
- - pir::islt__ISS(
- - pir::repr_unbox_str__SP($a),
- - pir::repr_unbox_str__SP($b)))
- + nqp::p6bool(pir::islt__ISS(nqp::unbox_s($a), nqp::unbox_s($b)))
- }
- multi infix:<le>(Str \$a, Str \$b) {
- - pir::perl6_booleanize__PI(
- - pir::isle__ISS(
- - pir::repr_unbox_str__SP($a),
- - pir::repr_unbox_str__SP($b)))
- + nqp::p6bool(pir::isle__ISS(nqp::unbox_s($a), nqp::unbox_s($b)))
- }
- multi infix:<gt>(Str \$a, Str \$b) {
- - pir::perl6_booleanize__PI(
- - pir::isgt__ISS(
- - pir::repr_unbox_str__SP($a),
- - pir::repr_unbox_str__SP($b)))
- + nqp::p6bool(pir::isgt__ISS(nqp::unbox_s($a), nqp::unbox_s($b)))
- }
- multi infix:<ge>(Str \$a, Str \$b) {
- - pir::perl6_booleanize__PI(
- - pir::isge__ISS(
- - pir::repr_unbox_str__SP($a),
- - pir::repr_unbox_str__SP($b)))
- + nqp::p6bool(pir::isge__ISS(nqp::unbox_s($a), nqp::unbox_s($b)))
- }
- multi infix:<~|>(Str \$a, Str \$b) {
- - pir::perl6_box_str__PS(
- - pir::bors__SSS(
- - pir::repr_unbox_str__SP($a),
- - pir::repr_unbox_str__SP($b)))
- + nqp::p6box_s(pir::bors__SSS(nqp::unbox_s($a), nqp::unbox_s($b)))
- }
- multi infix:<~&>(Str \$a, Str \$b) {
- - pir::perl6_box_str__PS(
- - pir::bands__SSS(
- - pir::repr_unbox_str__SP($a),
- - pir::repr_unbox_str__SP($b)))
- + nqp::p6box_s(pir::bands__SSS(nqp::unbox_s($a), nqp::unbox_s($b)))
- }
- multi infix:<~^>(Str \$a, Str \$b) {
- - pir::perl6_box_str__PS(
- - pir::bxors__SSS(
- - pir::repr_unbox_str__SP($a),
- - pir::repr_unbox_str__SP($b)))
- + nqp::p6box_s(pir::bxors__SSS(nqp::unbox_s($a), nqp::unbox_s($b)))
- }
- multi prefix:<~^>(Str \$a) {
- diff --git a/src/core/terms.pm b/src/core/terms.pm
- index 34b70f0..c1d290c 100644
- --- a/src/core/terms.pm
- +++ b/src/core/terms.pm
- @@ -1,2 +1,2 @@
- -sub term:<time>() { pir::perl6_box_int__PI(pir::time__I()) }
- +sub term:<time>() { nqp::p6box_i(pir::time__I()) }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement