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

Unified Diff: lib/compiler/implementation/tree/nodes.dart

Issue 10557003: Fix most warnings and other minor cleanups. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase. Created 8 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
« no previous file with comments | « lib/compiler/implementation/ssa/tracer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/tree/nodes.dart
diff --git a/lib/compiler/implementation/tree/nodes.dart b/lib/compiler/implementation/tree/nodes.dart
index 3444c1f8e6b046fde5f1c0ae7a1998d0d7792187..fa36ce4cddb9e200eb68fc175d4c662a8f5fed9c 100644
--- a/lib/compiler/implementation/tree/nodes.dart
+++ b/lib/compiler/implementation/tree/nodes.dart
@@ -675,12 +675,9 @@ class LiteralBool extends Literal<bool> {
LiteralBool asLiteralBool() => this;
bool get value() {
- switch (token.value) {
- case Keyword.TRUE: return true;
- case Keyword.FALSE: return false;
- default:
- (this.handler)(token, "not a bool ${token.value}");
- }
+ if (token.value == Keyword.TRUE) return true;
+ if (token.value == Keyword.FALSE) return false;
+ (this.handler)(token, "not a bool ${token.value}");
}
accept(Visitor visitor) => visitor.visitLiteralBool(this);
« no previous file with comments | « lib/compiler/implementation/ssa/tracer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698