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

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

Issue 1967073002: Check closure data for serialization (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 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
« no previous file with comments | « pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 50db1bf00553b3735936d472965f8e9013c595b7..1a754fd18f29628daabe4c52d8651e26dd3bbd0d 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -512,7 +512,12 @@ class LocalsHandler {
// it could then have another name than the real parameter. And
// the other one would not know it is just a copy of the real
// parameter.
- if (local is ParameterElement) return builder.parameters[local];
+ if (local is ParameterElement) {
+ assert(invariant(local, builder.parameters.containsKey(local),
+ message: "No local value for parameter $local in "
+ "${builder.parameters}."));
+ return builder.parameters[local];
+ }
return builder.activationVariables.putIfAbsent(local, () {
JavaScriptBackend backend = builder.backend;
@@ -1801,14 +1806,15 @@ class SsaBuilder extends ast.Visitor
}
});
if (bodyElement == null) {
- bodyElement = new ConstructorBodyElementX(constructor);
+ bodyElement =
+ new ConstructorBodyElementX(constructorResolvedAst, constructor);
classElement.addBackendMember(bodyElement);
if (constructor.isPatch) {
// Create origin body element for patched constructors.
ConstructorBodyElementX patch = bodyElement;
- ConstructorBodyElementX origin =
- new ConstructorBodyElementX(constructor.origin);
+ ConstructorBodyElementX origin = new ConstructorBodyElementX(
+ constructorResolvedAst, constructor.origin);
origin.applyPatch(patch);
classElement.origin.addBackendMember(bodyElement.origin);
}
« no previous file with comments | « pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698