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 dd6ce4f634da3f33307ec3d24ccc32aea3a26488..b7afc131e2b69c8467613eb2789a9060ae322970 100644 |
--- a/pkg/compiler/lib/src/ssa/locals_handler.dart |
+++ b/pkg/compiler/lib/src/ssa/locals_handler.dart |
@@ -310,7 +310,7 @@ class LocalsHandler { |
return redirectionMapping.containsKey(local); |
} |
- bool isUsedInTryOrGenerator(Local local) { |
+ bool _isUsedInTryOrGenerator(Local local) { |
return closureData.variableIsUsedInTryOrSync(local); |
} |
@@ -360,7 +360,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); |
@@ -383,11 +383,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]; |
} |
@@ -426,7 +422,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); |