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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart

Issue 1412663006: Fix handling of boxed loop variable in CPS IR (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | tests/language/language_dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
index 529cdd4f98e3e33ac5a0c5dd9c1c17aa5fc32ee4..02c877c9fc82b07e38d7e7f7eb5617399165249b 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
@@ -2535,6 +2535,7 @@ class IrBuilder {
newBox.useElementAsHint(scope.box);
for (VariableElement loopVar in scope.boxedLoopVariables) {
ClosureLocation location = scope.capturedVariables[loopVar];
+ if (location == null) continue;
Siggi Cherem (dart-lang) 2015/10/23 01:39:58 I'm not certain that this is the right fix. What I
asgerf 2015/10/23 09:37:30 'n' is captured but not boxed, so it's absurd that
ir.Primitive value = addPrimitive(new ir.GetField(box, location.field));
addPrimitive(new ir.SetField(newBox, location.field, value));
}
« no previous file with comments | « no previous file | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698