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

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

Issue 1129693005: MutableVariable no longer has a host Element. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update SExpressionUnstringifier Created 5 years, 7 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 8d5c2fbe49f6e1f1d18074e5001c921254f5b5e7..a8ede5cef1cd67e216989af369e0f2a46407110b 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
@@ -82,7 +82,6 @@ class Builder implements cps_ir.Visitor<Node> {
Variable phiTempVar;
Variable addMutableVariable(cps_ir.MutableVariable irVariable) {
- assert(irVariable.host == currentElement);
assert(!mutable2variable.containsKey(irVariable));
Variable variable = new Variable(currentElement, irVariable.hint);
mutable2variable[irVariable] = variable;
@@ -90,7 +89,7 @@ class Builder implements cps_ir.Visitor<Node> {
}
Variable getMutableVariable(cps_ir.MutableVariable mutableVariable) {
- if (mutableVariable.host != currentElement) {
+ if (!mutable2variable.containsKey(mutableVariable)) {
return parent.getMutableVariable(mutableVariable)..isCaptured = true;
}
return mutable2variable[mutableVariable];
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart ('k') | tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698