Skip to content

Commit

Permalink
Fix code-gen for if/unless (yes, really).
Browse files Browse the repository at this point in the history
I'm amazed so much worked without hitting this...
  • Loading branch information
jnthn committed Feb 13, 2013
1 parent e9de357 commit 7bc9337
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/QAST/JASTCompiler.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ for <if unless> -> $op_name {
$res_temp := fresh($res_type);
$il.append($qastcomp.coercion($then, $res_type));
$il.append(JAST::Instruction.new( :op(store_ins($res_type)), $res_temp ));
$il.append(JAST::Instruction.new( :op('goto'), $end_lbl ));
$il.append($else_lbl);
$il.append(JAST::Instruction.new( :op(load_ins($old_res_type)), $old_res_temp ));
$il.append($qastcomp.coercion($cond, $res_type));
Expand Down

0 comments on commit 7bc9337

Please sign in to comment.