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

Commit

Permalink
Fix CFG block splitting on labels.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed May 6, 2012
1 parent b48d66b commit 2bd7bff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/furnace-avm2/transform/cfg_build.rb
Expand Up @@ -32,6 +32,10 @@ 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 All @@ -48,7 +52,6 @@ def transform(ast, body)

case node.type
when :label
@jumps.add node.children.first
node.update :nop

when :return_value, :return_void
Expand Down

0 comments on commit 2bd7bff

Please sign in to comment.