Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge barriers in FoldPassthroughAssignments.

  • Loading branch information...
commit d3ee145c5b6c53409b1a7f46ffed02abdd6b3596 1 parent 3924878
@whitequark authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/furnace-avm2/transform/fold_passthrough_assignments.rb
View
6 lib/furnace-avm2/transform/fold_passthrough_assignments.rb
@@ -25,8 +25,14 @@ def transform(cfg)
# Fold the constructs.
set_node = block.metadata.set_map[id]
_, set_value = set_node.children
+
sorted_nodes.reduce(set_value) do |prev, (node, upper)|
+ [ :read_barrier, :write_barrier ].each do |key|
+ upper.metadata[key].merge prev.metadata[key]
+ end
+
node.update(prev.type, prev.children)
+
upper
end
Please sign in to comment.
Something went wrong with that request. Please try again.