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); |
} |