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

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

Issue 1932183003: Handle deserialized compilation of closures (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 25482de3b1ebbe832a4acccc5446447baa9b373c..818de855352acca8fa15c29ec2fbd410f5134522 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -1753,12 +1753,15 @@ class SsaBuilder extends ast.Visitor
}
HGraph buildLazyInitializer(VariableElement variable) {
+ assert(invariant(variable, resolvedAst.element == variable,
+ message: "Unexpected variable $variable for $resolvedAst."));
inLazyInitializerExpression = true;
- assert(invariant(variable, variable.initializer != null,
+ ast.VariableDefinitions node = resolvedAst.node;
+ ast.Node initializer = resolvedAst.body;
+ assert(invariant(variable, initializer != null,
message: "Non-constant variable $variable has no initializer."));
- ast.VariableDefinitions node = variable.node;
openFunction(variable, node);
- visit(variable.initializer);
+ visit(initializer);
HInstruction value = pop();
value = potentiallyCheckOrTrustType(value, variable.type);
ast.SendSet sendSet = node.definitions.nodes.head;

Powered by Google App Engine
This is Rietveld 408576698