Permalink
Browse files

Fix a bug introduced in 2bd7bff.

  • Loading branch information...
1 parent 2bd7bff commit cf5d43e33c97007d451bba2043db76cfd3688227 @whitequark committed May 6, 2012
Showing with 1 addition and 5 deletions.
  1. +1 −5 lib/furnace-avm2/transform/cfg_build.rb
@@ -32,10 +32,6 @@ def transform(ast, body)
@pending_queue = []
ast.children.each_with_index do |node, index|
- if node.type == :label
- cutoff(nil, [ node.metadata[:label] ])
- end
-
unless @pending_label
@pending_label = node.metadata[:label]
@@ -73,7 +69,7 @@ def transform(ast, body)
else
*, next_exception_block = exception_block_for(next_label)
- if @jumps.include?(next_label)
+ if @jumps.include?(next_label) || next_node.type == :label
cutoff(nil, [next_label])
elsif @pending_exc_block != next_exception_block
cutoff(nil, [next_label])

0 comments on commit cf5d43e

Please sign in to comment.