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

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

Issue 2647043002: Fix hints reported by analyzer. (Closed)
Patch Set: Address review comments. Created 3 years, 11 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/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/graph_builder.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 223889ecc1e916ceedd510536196d5b16904cec4..25a05f7f96025c725a57888b22da2dcb224c7d4b 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -25,7 +25,7 @@ import '../kernel/kernel.dart';
import '../native/native.dart' as native;
import '../resolution/tree_elements.dart';
import '../tree/dartstring.dart';
-import '../tree/nodes.dart' show Node, BreakStatement;
+import '../tree/nodes.dart' show Node;
import '../types/masks.dart';
import '../universe/call_structure.dart' show CallStructure;
import '../universe/selector.dart';
@@ -597,7 +597,6 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
returnStatement.expression.accept(this);
value = pop();
if (_targetFunction.asyncMarker == ir.AsyncMarker.Async) {
- var returnType = astAdapter.getDartType(_targetFunction.returnType);
if (compiler.options.enableTypeAssertions &&
!isValidAsyncReturnType(_targetFunction.returnType)) {
generateTypeError(
@@ -1244,14 +1243,10 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
bool hasContinue = false;
Map<ir.SwitchCase, int> caseIndex = new Map<ir.SwitchCase, int>();
int switchIndex = 1;
- bool hasDefault = false;
for (ir.SwitchCase switchCase in switchStatement.cases) {
if (SwitchContinueAnalysis.containsContinue(switchCase.body)) {
hasContinue = true;
}
- if (switchCase.isDefault) {
- hasDefault = true;
- }
caseIndex[switchCase] = switchIndex;
switchIndex++;
}
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/graph_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698