Skip to content

Commit

Permalink
Simplify JVM for loop code-gen.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Feb 8, 2014
1 parent ce92c5b commit 106ea20
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/vm/jvm/QAST/Compiler.nqp
Expand Up @@ -1264,13 +1264,10 @@ QAST::OperationsJAST.add_core_op('for', -> $qastcomp, $op {
for @val_temps {
$inv_ast.push(QAST::Var.new( :name($_), :scope('local') ));
}
my $inv_res := $qastcomp.as_jast($inv_ast, :want($res ?? $RT_OBJ !! $RT_VOID));
my $inv_res := $qastcomp.as_jast($inv_ast, :want($RT_VOID));
my $inv_il := JAST::InstructionList.new();
$inv_il.append($inv_res.jast);
$*STACK.obtain($inv_il, $inv_res);
if $res {
$inv_il.append(JAST::Instruction.new( :op('astore'), $res ));
}

# Wrap block invocation in redo handler if needed.
if $handler {
Expand Down

0 comments on commit 106ea20

Please sign in to comment.