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

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

Issue 2456643006: More functionality in kernel_impact. (Closed)
Patch Set: Fix errors. Created 4 years, 1 month 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/serialization/system.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.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 9e17d7a9a503202de4c087bd2b3aba3d73dcb598..64e36f7bcb7ebed25e527e2df0b50f2e9e867bfa 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -6197,7 +6197,6 @@ class SsaBuilder extends ast.Visitor
List<HStatementInformation> statements = <HStatementInformation>[];
bool hasDefault = false;
- Element getFallThroughErrorElement = helpers.fallThroughError;
HasNextIterator<ast.Node> caseIterator =
new HasNextIterator<ast.Node>(switchCases.iterator);
while (caseIterator.hasNext) {
@@ -6220,8 +6219,8 @@ class SsaBuilder extends ast.Visitor
localsHandler = new LocalsHandler.from(savedLocals);
buildSwitchCase(switchCase);
if (!isAborted()) {
- if (caseIterator.hasNext) {
- pushInvokeStatic(switchCase, getFallThroughErrorElement, []);
+ if (caseIterator.hasNext && isReachable) {
+ pushInvokeStatic(switchCase, helpers.fallThroughError, []);
HInstruction error = pop();
closeAndGotoExit(new HThrow(error, error.sourceInformation));
} else if (!isDefaultCase(switchCase)) {
« no previous file with comments | « pkg/compiler/lib/src/serialization/system.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