Skip to content

Commit

Permalink
Revert "Rework IterateOneWithoutPhaser.push-all a bit"
Browse files Browse the repository at this point in the history
This reverts commit d828172.

The reverted commit causes a regression in zef
  • Loading branch information
ugexe committed Jul 15, 2021
1 parent 7f5f60e commit 271b64f
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions src/core.c/Any-iterable-methods.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -365,30 +365,32 @@ augment class Any {
method push-all(\target --> IterationEnd) {
self.push-rest(target) unless nqp::isnull($!slipper);

my $pulled := $!source.pull-one;
nqp::until(
nqp::eqaddr($pulled,IterationEnd),
nqp::handle(
nqp::stmts(
nqp::if(
nqp::istype((my $value := &!block($pulled)),Slip),
self.slip-all($value, target),
target.push($value)
nqp::eqaddr((my $value := $!source.pull-one),IterationEnd),
nqp::stmts(
(my int $redo = 1),
nqp::while(
$redo,
nqp::stmts(
($redo = 0),
nqp::handle(
nqp::if(
nqp::istype((my $result := &!block($value)),Slip),
self.slip-all($result,target),
target.push($result)
),
'LABELED', $!label,
'REDO', ($redo = 1),
'NEXT', self.push-control-payload(target),
'LAST', nqp::stmts(
self.push-control-payload(target),
return
)
)
),
($pulled := $!source.pull-one),
),
'LABELED', $!label,
'REDO', nqp::null,
'NEXT', nqp::stmts(
self.push-control-payload(target),
($pulled := $!source.pull-one)
),
'LAST', nqp::stmts(
self.push-control-payload(target),
($pulled := IterationEnd)
:nohandler
)
),
:nohandler
)
);
}

Expand Down

0 comments on commit 271b64f

Please sign in to comment.