Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid a more expensive ! in GatherIter; remove some Q:PIR.
  • Loading branch information
jnthn committed Nov 1, 2011
1 parent 9fc3eb2 commit f71cff1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/core/GatherIter.pm
Expand Up @@ -20,15 +20,10 @@ class GatherIter is Iterator {
if !$!reified.defined {
my Mu $rpa := nqp::list();
my Mu $parcel;
my $end;
my $end = Bool::False;
my $count = nqp::istype($n, Whatever) ?? 1 !! $n;
while !$end && $count > 0 {
$parcel := Q:PIR {
$P0 = find_lex 'self'
$P1 = find_lex 'GatherIter'
$P2 = getattribute $P0, $P1, '$!coro'
%r = $P2()
};
$parcel := $!coro();
$end = nqp::p6bool(nqp::isnull($parcel));
nqp::push($rpa, $parcel) unless $end;
$count = $count - 1;
Expand Down

0 comments on commit f71cff1

Please sign in to comment.