Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(699)

Unified Diff: pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart

Issue 980853002: dart2dart: Bugfix in copy propagator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
index 2e8ace867f7ec4f812dbee52c451901a559df761..f582bdeb79430730d7c3c052ae5eabd19a45ef9b 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
@@ -82,9 +82,7 @@ class Builder implements cps_ir.Visitor<Node> {
Variable phiTempVar;
Variable addMutableVariable(cps_ir.MutableVariable irVariable) {
- if (irVariable.host != currentElement) {
- return parent.addMutableVariable(irVariable);
- }
+ assert(irVariable.host == currentElement);
assert(!local2mutable.containsKey(irVariable));
Variable variable = new Variable(currentElement, irVariable.hint);
local2mutable[irVariable] = variable;
@@ -93,7 +91,7 @@ class Builder implements cps_ir.Visitor<Node> {
Variable getMutableVariable(cps_ir.MutableVariable mutableVariable) {
if (mutableVariable.host != currentElement) {
- return parent.getMutableVariable(mutableVariable);
+ return parent.getMutableVariable(mutableVariable)..isCaptured = true;
}
return local2mutable[mutableVariable];
}

Powered by Google App Engine
This is Rietveld 408576698