Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Proper sink handling on JVM backend.
  • Loading branch information
jnthn committed Jul 25, 2013
1 parent 49404ef commit f173b55
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/MapIter.pm
Expand Up @@ -146,7 +146,7 @@ my class MapIter is Iterator {
$state = 0)
)),
nqp::if(nqp::iseq_i($state, 2), nqp::stmts(
nqp::push($rpa, $block($arg)),
($sink ?? $block($arg) !! nqp::push($rpa, $block($arg))),
$state = 1
))
),
Expand All @@ -173,7 +173,9 @@ my class MapIter is Iterator {
nqp::if($args, $state = 2, $state = 0)
)),
nqp::if(nqp::iseq_i($state, 2), nqp::stmts(
nqp::push($rpa, nqp::p6invokeflat($block, $args)),
($sink
?? nqp::p6invokeflat($block, $args)
!! nqp::push($rpa, nqp::p6invokeflat($block, $args))),
$state = 3
)),
nqp::if(nqp::iseq_i($state, 3), nqp::stmts(
Expand Down

0 comments on commit f173b55

Please sign in to comment.