Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Assorted pir:: => nqp::.
  • Loading branch information
jnthn committed Apr 9, 2013
1 parent 83d0f6c commit 00ca10a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/Perl6/Metamodel/BOOTSTRAP.pm
Expand Up @@ -201,8 +201,8 @@ BEGIN {
pir::perl6_booleanize__PI(1)
}));
Attribute.HOW.add_method(Attribute, 'set_build', static(sub ($self, $closure) {
pir::setattribute__0PPsP(nqp::decont($self),
Attribute, '$!build_closure', $closure);
nqp::bindattr(nqp::decont($self), Attribute, '$!build_closure', $closure);
$self
}));
Attribute.HOW.add_method(Attribute, 'build', static(sub ($self) {
nqp::getattr(nqp::decont($self),
Expand Down Expand Up @@ -245,8 +245,8 @@ BEGIN {
my @avc_mro := $avc_var.HOW.mro($avc_var);
my $i := 0;
$i := $i + 1 while @avc_mro[$i].HOW.is_mixin(@avc_mro[$i]);
nqp::bindattr($ins, Attribute, '$!auto_viv_container',
pir::setattribute__0PPsP($avc_copy, @avc_mro[$i], '$!descriptor', $cd_ins));
nqp::bindattr($avc_copy, @avc_mro[$i], '$!descriptor', $cd_ins);
nqp::bindattr($ins, Attribute, '$!auto_viv_container', $avc_copy);
}
if $pkg.HOW.archetypes.generic {
nqp::bindattr($ins, Attribute, '$!package',
Expand Down
6 changes: 4 additions & 2 deletions src/core/Any.pm
Expand Up @@ -283,9 +283,10 @@ my class Any {
self;
}
multi method at_pos(Any:U \SELF: $pos) is rw {
pir::setattribute__0PPsP(my $v, Scalar, '$!whence',
nqp::bindattr(my $v, Scalar, '$!whence',
-> { SELF.defined || &infix:<=>(SELF, Array.new);
SELF.bind_pos($pos, $v) });
$v
}

method all() { all(self.list) }
Expand Down Expand Up @@ -394,9 +395,10 @@ my class Any {
fail "postcircumfix:<\{ \}> not defined for type {self.WHAT.perl}";
}
multi method at_key(Any:U \SELF: $key) is rw {
pir::setattribute__0PPsP(my $v, Scalar, '$!whence',
nqp::bindattr(my $v, Scalar, '$!whence',
-> { SELF.defined || &infix:<=>(SELF, Hash.new);
SELF.bind_key($key, $v) });
$v
}

method reduce(&with) { self.list.reduce(&with) }
Expand Down
3 changes: 1 addition & 2 deletions src/core/Routine.pm
Expand Up @@ -36,8 +36,7 @@ my class Routine {
}
# Call this lexical sub to get rid of 'self' in the signature.
sub checker(|) {
my Mu $cap := pir::find_lex__Ps('call_sig');
nqp::hllize($disp.find_best_dispatchee($cap, 1))
nqp::hllize($disp.find_best_dispatchee(nqp::usecapture(), 1))
}
checker(|$c);
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/terms.pm
Expand Up @@ -86,7 +86,7 @@ sub term:<time>() { nqp::p6box_i(nqp::time_i()) }

my $I := nqp::atkey(nqp::atkey(%*COMPILING, '%?OPTIONS'), 'I');
if nqp::defined($I) {
if pir::does__IPs($I, 'array') {
if nqp::islist($I) {
my Mu $iter := nqp::iterator($I);
@INC.unshift: nqp::p6box_s(nqp::shift($iter)) while $iter;
}
Expand Down

0 comments on commit 00ca10a

Please sign in to comment.