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

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 2995353002: Test the CapturedScope for local functions (Closed)
Patch Set: Created 3 years, 4 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/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 2e897ecbdc1090b25c2523fcd878de9a0b18ada5..4fc7d189812dc42503efd3707e4a45c04b38cc15 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -1382,8 +1382,8 @@ class SsaAstGraphBuilder extends ast.Visitor
// pass the box to the constructor.
// The box must be passed before any type variable.
CapturedScope scopeData = closureDataLookup.getCapturedScope(constructor);
- if (scopeData.requiresContextBox) {
- bodyCallInputs.add(localsHandler.readLocal(scopeData.context));
+ if (scopeData.hasBox) {
+ bodyCallInputs.add(localsHandler.readLocal(scopeData.box));
}
// Type variables arguments must come after the box (if there is one).

Powered by Google App Engine
This is Rietveld 408576698