Skip to content
This repository has been archived by the owner on Nov 2, 2019. It is now read-only.

Commit

Permalink
Fix a bug introduced in 2bd7bff.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed May 6, 2012
1 parent 2bd7bff commit cf5d43e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/furnace-avm2/transform/cfg_build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down Expand Up @@ -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])
Expand Down

0 comments on commit cf5d43e

Please sign in to comment.