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

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

Issue 2938203003: Compute KernelClosureRepresentationInfo.variableIsUsedInTryOrSync (Closed)
Patch Set: Remove test line 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 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);
« pkg/compiler/lib/src/ssa/builder.dart ('K') | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698