Index: pkg/compiler/lib/src/ssa/locals_handler.dart |
diff --git a/pkg/compiler/lib/src/ssa/locals_handler.dart b/pkg/compiler/lib/src/ssa/locals_handler.dart |
index d1c433b499243b95238e6e85dc6216e7e45a7a46..8c7f30d52541fb7da0fa6f63b0e71615a35c29ca 100644 |
--- a/pkg/compiler/lib/src/ssa/locals_handler.dart |
+++ b/pkg/compiler/lib/src/ssa/locals_handler.dart |
@@ -309,7 +309,7 @@ class LocalsHandler { |
return redirectionMapping.containsKey(local); |
} |
- bool isUsedInTryOrGenerator(Local local) { |
+ bool _isUsedInTryOrGenerator(Local local) { |
return closureData.variableIsUsedInTryOrSync(local); |
} |
@@ -359,7 +359,7 @@ class LocalsHandler { |
builder.add(lookup); |
return lookup..sourceInformation = sourceInformation; |
} else { |
- assert(isUsedInTryOrGenerator(local)); |
+ assert(_isUsedInTryOrGenerator(local)); |
HLocalValue localValue = getLocal(local); |
HInstruction instruction = new HLocalGet( |
local, localValue, commonMasks.dynamicType, sourceInformation); |
@@ -382,11 +382,7 @@ 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) { |
- assert( |
- builder.parameters.containsKey(local), |
- failedAt(local, |
- "No local value for parameter $local in ${builder.parameters}.")); |
+ if (builder.parameters.containsKey(local)) { |
return builder.parameters[local]; |
} |
@@ -425,7 +421,7 @@ class LocalsHandler { |
builder.add(new HFieldSet(redirect, box, value) |
..sourceInformation = sourceInformation); |
} else { |
- assert(isUsedInTryOrGenerator(local)); |
+ assert(_isUsedInTryOrGenerator(local)); |
HLocalValue localValue = getLocal(local); |
builder.add(new HLocalSet(local, localValue, value) |
..sourceInformation = sourceInformation); |