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

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

Issue 11052011: Fix some warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 2 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 | « no previous file | lib/compiler/implementation/constants.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/compiler.dart
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
index 70ed9c234b323d563db8181bb274348e4d3865fe..6d4217cb0e71a1842acf62ed771273bd29993131 100644
--- a/lib/compiler/implementation/compiler.dart
+++ b/lib/compiler/implementation/compiler.dart
@@ -57,7 +57,7 @@ class WorkItem {
}
}
-class Backend {
+abstract class Backend {
final Compiler compiler;
final ConstantSystem constantSystem;
@@ -78,6 +78,9 @@ class Backend {
abstract void assembleProgram();
abstract List<CompilerTask> get tasks;
+ // TODO(ahe,karlklose): rename this?
+ void dumpInferredTypes() {}
+
ItemCompilationContext createItemCompilationContext() {
return new ItemCompilationContext();
}
@@ -85,7 +88,7 @@ class Backend {
SourceString getCheckedModeHelper(DartType type) => null;
}
-class Compiler implements DiagnosticListener {
+abstract class Compiler implements DiagnosticListener {
final Map<String, LibraryElement> libraries;
int nextFreeClassId = 0;
World world;
@@ -592,18 +595,7 @@ class Compiler implements DiagnosticListener {
if (compilationFailed) return;
assert(world.checkNoEnqueuedInvokedInstanceMethods());
if (DUMP_INFERRED_TYPES && phase == PHASE_COMPILING) {
- print("Inferred argument types:");
- print("------------------------");
- backend.argumentTypes.dump();
- print("");
- print("Inferred return types:");
- print("----------------------");
- backend.dumpReturnTypes();
- print("");
- print("Inferred field types:");
- print("------------------------");
- backend.fieldTypes.dump();
- print("");
+ backend.dumpInferredTypes();
}
}
@@ -850,6 +842,8 @@ class Compiler implements DiagnosticListener {
unimplemented('Compiler.legDirectory');
}
+ // TODO(karlklose): split into findHelperFunction and findHelperClass and
+ // add a check that the element has the expected kind.
Element findHelper(SourceString name)
=> jsHelperLibrary.findLocal(name);
Element findInterceptor(SourceString name)
« no previous file with comments | « no previous file | lib/compiler/implementation/constants.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698