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

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

Issue 2682553002: Fix lingering switch statement test failures. (Closed)
Patch Set: associateNode Created 3 years, 10 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
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder_kernel.dart
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index 9bbc96dfb3388d5204af7d8495b8d6449ee49b1b..d5c9ea19937d48dc7d4e56e7e26a793582d52b28 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -814,7 +814,7 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
Local loopVariableLocal = astAdapter.getLocal(forInStatement.variable);
localsHandler.updateLocal(loopVariableLocal, value);
// Hint to name loop value after name of loop variable.
- if (loopVariableLocal is !SyntheticLocal) {
+ if (loopVariableLocal is! SyntheticLocal) {
value.sourceElement ??= loopVariableLocal;
}
@@ -876,7 +876,7 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
HInstruction value = pop();
localsHandler.updateLocal(loopVariableLocal, value);
// Hint to name loop value after name of loop variable.
- if (loopVariableLocal is !SyntheticLocal) {
+ if (loopVariableLocal is! SyntheticLocal) {
value.sourceElement ??= loopVariableLocal;
}
forInStatement.body.accept(this);
@@ -1419,7 +1419,7 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
// This is because JS does not have this same "continue label" semantics so
// we encode it in the form of a state machine.
- JumpTarget switchTarget = astAdapter.getJumpTarget(switchStatement.parent);
+ JumpTarget switchTarget = astAdapter.getJumpTarget(switchStatement);
localsHandler.updateLocal(switchTarget, graph.addConstantNull(closedWorld));
var switchCases = switchStatement.cases;
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698