Permalink
Browse files

Fix corner-case infinite/do-while loop handling.

  • Loading branch information...
whitequark committed Aug 19, 2012
1 parent c6f37aa commit aebfc78ac61b10dc1ed8dff7693165b63567abdc
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/furnace-avm2/transform/cfg_reduce.rb
@@ -338,7 +338,8 @@ def extended_block(block, stopgap=nil, loop_stack=[], nesting=0, upper_exc=nil,
end
end
- if back_edges.count == 1
+ if back_edges.count == 1 &&
+ back_edges.first.cti
log nesting, "is a do-while loop"
loop_type = :tail_cti

0 comments on commit aebfc78

Please sign in to comment.