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

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

Issue 2938203003: Compute KernelClosureRepresentationInfo.variableIsUsedInTryOrSync (Closed)
Patch Set: Merge KernelClosureConversionTask and KernelClosureDataLookup Created 3 years, 6 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/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);

Powered by Google App Engine
This is Rietveld 408576698