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

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

Issue 10854140: Fix type inference for self-recursive functions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
Index: lib/compiler/implementation/compiler.dart
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
index e2ffd0d784faeded57c264c98b97ecd113de2fbe..76c2a1c93bd14eacccb6ef031344ea750c3b6479 100644
--- a/lib/compiler/implementation/compiler.dart
+++ b/lib/compiler/implementation/compiler.dart
@@ -24,11 +24,11 @@ class WorkItem {
bool isAnalyzed() => resolutionTree !== null;
- String run(Compiler compiler, Enqueuer world) {
+ void run(Compiler compiler, Enqueuer world) {
CodeBuffer codeBuffer = world.universe.generatedCode[element];
- if (codeBuffer !== null) return codeBuffer.toString();
+ if (codeBuffer !== null) return;
resolutionTree = compiler.analyze(this, world);
- return compiler.codegen(this, world);
+ compiler.codegen(this, world);
}
}
@@ -44,7 +44,7 @@ class Backend {
}
abstract void enqueueHelpers(Enqueuer world);
- abstract CodeBuffer codegen(WorkItem work);
+ abstract void codegen(WorkItem work);
abstract void processNativeClasses(Enqueuer world,
Collection<LibraryElement> libraries);
abstract void assembleProgram();
@@ -743,7 +743,7 @@ class Compiler implements DiagnosticListener {
return result;
}
- String codegen(WorkItem work, Enqueuer world) {
+ void codegen(WorkItem work, Enqueuer world) {
if (world !== enqueuer.codegen) return null;
if (progress.elapsedInMs() > 500) {
// TODO(ahe): Add structured diagnostics to the compiler API and
@@ -757,11 +757,8 @@ class Compiler implements DiagnosticListener {
}
if (work.element.kind.category == ElementCategory.VARIABLE) {
constantHandler.compileWorkItem(work);
- return null;
} else {
CodeBuffer codeBuffer = backend.codegen(work);
ahe 2012/08/14 07:57:56 codeBuffer is never used.
Søren Gjesse 2012/08/14 08:26:30 Removed.
- codegenWorld.addGeneratedCode(work, codeBuffer);
- return codeBuffer.toString();
}
}

Powered by Google App Engine
This is Rietveld 408576698