Permalink
Browse files

Eliminate various pir:: usages.

  • Loading branch information...
1 parent 9c15141 commit 7372a10b19102de67d9126cb2aa24a3605640965 @jnthn jnthn committed Oct 16, 2012
Showing with 13 additions and 13 deletions.
  1. +1 −1 src/core/Any.pm
  2. +1 −1 src/core/Buf.pm
  3. +1 −1 src/core/Capture.pm
  4. +1 −1 src/core/IO.pm
  5. +2 −2 src/core/Mu.pm
  6. +2 −2 src/core/Parameter.pm
  7. +4 −4 src/core/control.pm
  8. +1 −1 src/core/traits.pm
View
@@ -43,7 +43,7 @@ my class Any {
method join($separator = '') {
my $list = (self,).flat.eager;
- my Mu $rsa := pir::new__Ps('ResizableStringArray');
+ my Mu $rsa := nqp::list_s();
$list.gimme(4); # force reification of at least 4 elements
nqp::push_s($rsa, nqp::unbox_s($list.shift.Stringy))
while $list.gimme(0);
View
@@ -20,7 +20,7 @@ my class Buf does Positional {
}
method !set_codes(@codes) {
my int $bytes = @codes.elems;
- my $rsa := pir::new__Ps('ResizableStringArray');
+ my $rsa := nqp::list_s();
my int $i = 0;
while $i < $bytes {
nqp::bindpos_s($rsa, $i, nqp::chr(nqp::unbox_i(@codes[$i])));
View
@@ -54,7 +54,7 @@ my class Capture {
}
multi method Str(Capture:D:) {
- my Mu $str := pir::new__Ps('ResizableStringArray');
+ my Mu $str := nqp::list_s();
if $!list {
my Mu $iter := nqp::iterator($!list);
nqp::push_s($str, nqp::unbox_s(nqp::shift($iter).Str)) while $iter;
View
@@ -292,7 +292,7 @@ my class IO::Path is Cool does IO::FileTestable {
sub dir(Cool $path = '.', Mu :$test = none('.', '..')) {
my Mu $RSA := pir::new__PS('OS').readdir(nqp::unbox_s($path.Str));
- my int $elems = pir::set__IP($RSA);
+ my int $elems = nqp::elems($RSA);
my @res;
loop (my int $i = 0; $i < $elems; $i = $i + 1) {
my Str $file := nqp::p6box_s(pir::trans_encoding__Ssi(
View
@@ -89,7 +89,7 @@ my class Mu {
# that slurpy hashes sometimes lead to double containers
# somehow...
nqp::getattr(self, nqp::atpos($task, 1),
- nqp::atpos($task, 3)) = pir::nqp_decontainerize__PP(%attrinit{$key_name});
+ nqp::atpos($task, 3)) = nqp::p6decont(%attrinit{$key_name});
}
}
elsif nqp::iseq_i(nqp::atpos_i($task, 0), 4) {
@@ -123,7 +123,7 @@ my class Mu {
my $key_name := nqp::p6box_s(nqp::atpos_s($task, 2));
if %attrinit.exists($key_name) {
nqp::getattr(self, nqp::atpos($task, 1),
- nqp::atpos_s($task, 3)) = pir::nqp_decontainerize__PP(%attrinit{$key_name});
+ nqp::atpos_s($task, 3)) = nqp::p6decont(%attrinit{$key_name});
}
}
elsif nqp::iseq_i(nqp::atpos_i($task, 0), 4) {
View
@@ -24,12 +24,12 @@ my class Parameter {
method constraint_list() {
nqp::isnull($!post_constraints) ?? () !!
- pir::perl6ize_type__PP($!post_constraints)
+ nqp::p6type($!post_constraints)
}
method constraints() {
all(nqp::isnull($!post_constraints) ?? () !!
- pir::perl6ize_type__PP($!post_constraints))
+ nqp::p6type($!post_constraints))
}
method type() {
View
@@ -135,9 +135,9 @@ multi sub die(*@msg) is hidden_from_backtrace {
multi sub warn(*@msg) is hidden_from_backtrace {
my $ex := pir::new__Ps('Exception');
- pir::setattribute__0PPsP($ex, Exception, 'message', @msg.join(''));
- pir::setattribute__0PPsP($ex, Exception, 'type', nqp::p6box_i(pir::const::CONTROL_OK));
- pir::setattribute__0PPsP($ex, Exception, 'severity', nqp::p6box_i(pir::const::EXCEPT_WARNING));
+ nqp::bindattr($ex, Exception, 'message', @msg.join(''));
+ nqp::bindattr($ex, Exception, 'type', nqp::p6box_i(pir::const::CONTROL_OK));
+ nqp::bindattr($ex, Exception, 'severity', nqp::p6box_i(pir::const::EXCEPT_WARNING));
nqp::throw($ex);
0;
}
@@ -159,7 +159,7 @@ multi sub eval(Str $code, :$lang = 'perl6') {
sub exit($status = 0) {
- $_() for pir::perl6ize_type__PP(@*END_PHASERS);
+ $_() for nqp::p6type(@*END_PHASERS);
nqp::exit(nqp::unbox_i($status.Int));
$status;
}
View
@@ -92,7 +92,7 @@ multi trait_mod:<is>(Parameter:D $param, :$parcel!) {
# full-blown serialization, though.
sub EXPORT_SYMBOL(\exp_name, @tags, Mu \sym) {
my @export_packages = $*EXPORT;
- for pir::perl6ize_type__PP(@*PACKAGES) {
+ for nqp::p6type(@*PACKAGES) {
unless .WHO.exists('EXPORT') {
.WHO<EXPORT> := Metamodel::PackageHOW.new_type(:name('EXPORT'));
.WHO<EXPORT>.^compose;

0 comments on commit 7372a10

Please sign in to comment.