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

Unified Diff: pkg/compiler/lib/src/js/placeholder_safety.dart

Issue 2815383003: Finish cleaning up analyzer warnings (Closed)
Patch Set: Created 3 years, 8 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/common/backend_api.dart ('k') | pkg/compiler/lib/src/serialization/equivalence.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js/placeholder_safety.dart
diff --git a/pkg/compiler/lib/src/js/placeholder_safety.dart b/pkg/compiler/lib/src/js/placeholder_safety.dart
index 62140eaeada60df270cc97065bcfb909a87fd4ad..32571e4694709397b5c5c67fa936d6b67e53c2aa 100644
--- a/pkg/compiler/lib/src/js/placeholder_safety.dart
+++ b/pkg/compiler/lib/src/js/placeholder_safety.dart
@@ -125,7 +125,7 @@ class PlaceholderSafetyAnalysis extends js.BaseVisitor<int> {
int visitAccess(js.PropertyAccess node) {
int first = visit(node.receiver);
- int second = visit(node.selector);
+ visit(node.selector);
// TODO(sra): If the JS is annotated as never throwing, we can avoid this.
if (canBeNull(first)) safe = false;
return UNKNOWN_VALUE;
@@ -162,7 +162,7 @@ class PlaceholderSafetyAnalysis extends js.BaseVisitor<int> {
// "a.b.x = c.y" gives a TypeError for null values in this order: `a`,
// `c`, `a.b`.
int receiver = visit(left.receiver);
- int selector = visit(left.selector);
+ visit(left.selector);
int value = visit(right);
if (canBeNull(receiver)) safe = false;
return value;
@@ -210,27 +210,27 @@ class PlaceholderSafetyAnalysis extends js.BaseVisitor<int> {
case "&":
case "^":
case "|":
- int left = visit(node.left);
- int right = visit(node.right);
+ visit(node.left);
+ visit(node.right);
return NONNULL_VALUE; // Number, String, Boolean.
case ',':
- int left = visit(node.left);
+ visit(node.left);
int right = visit(node.right);
return right;
case "&&":
case "||":
- int left = visit(node.left);
+ visit(node.left);
// TODO(sra): Might be safe, e.g. "x || 0".
safe = false;
- int right = visit(node.right);
+ visit(node.right);
return UNKNOWN_VALUE;
case "instanceof":
case "in":
- int left = visit(node.left);
- int right = visit(node.right);
+ visit(node.left);
+ visit(node.right);
return UNKNOWN_VALUE;
default:
@@ -239,11 +239,11 @@ class PlaceholderSafetyAnalysis extends js.BaseVisitor<int> {
}
int visitConditional(js.Conditional node) {
- int cond = visit(node.condition);
+ visit(node.condition);
// TODO(sra): Might be safe, e.g. "# ? 1 : 2".
safe = false;
- int thenValue = visit(node.then);
- int elseValue = visit(node.otherwise);
+ visit(node.then);
+ visit(node.otherwise);
return UNKNOWN_VALUE;
}
« no previous file with comments | « pkg/compiler/lib/src/common/backend_api.dart ('k') | pkg/compiler/lib/src/serialization/equivalence.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698