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

Unified Diff: lib/compiler/implementation/resolver.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/operations.dart ('k') | lib/compiler/implementation/scanner/scanner_bench.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/resolver.dart
diff --git a/lib/compiler/implementation/resolver.dart b/lib/compiler/implementation/resolver.dart
index 8d449dbccaf7c811ebc117210342d57caf3d709f..3ab84c7dc809e0ce33018a5d292fe93d2917124b 100644
--- a/lib/compiler/implementation/resolver.dart
+++ b/lib/compiler/implementation/resolver.dart
@@ -50,24 +50,23 @@ class ResolverTask extends CompilerTask {
TreeElements resolve(Element element) {
return measure(() {
- switch (element.kind) {
- case ElementKind.GENERATIVE_CONSTRUCTOR:
- case ElementKind.FUNCTION:
- case ElementKind.GETTER:
- case ElementKind.SETTER:
- return resolveMethodElement(element);
-
- case ElementKind.FIELD:
- return resolveField(element);
-
- case ElementKind.PARAMETER:
- case ElementKind.FIELD_PARAMETER:
- return resolveParameter(element);
-
- default:
- compiler.unimplemented(
- "resolve($element)", node: element.parseNode(compiler));
+ ElementKind kind = element.kind;
+ if (kind === ElementKind.GENERATIVE_CONSTRUCTOR ||
+ kind === ElementKind.FUNCTION ||
+ kind === ElementKind.GETTER ||
+ kind === ElementKind.SETTER) {
+ return resolveMethodElement(element);
}
+
+ if (kind === ElementKind.FIELD) return resolveField(element);
+
+ if (kind === ElementKind.PARAMETER ||
+ kind === ElementKind.FIELD_PARAMETER) {
+ return resolveParameter(element);
+ }
+
+ compiler.unimplemented("resolve($element)",
+ node: element.parseNode(compiler));
});
}
« no previous file with comments | « lib/compiler/implementation/operations.dart ('k') | lib/compiler/implementation/scanner/scanner_bench.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698