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

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: Add method for retreiving generated code for dart2js tests 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
« no previous file with comments | « no previous file | lib/compiler/implementation/dart_backend/backend.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 e2ffd0d784faeded57c264c98b97ecd113de2fbe..b37b81e912b075cf79ec313394203296cc18b230 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);
- codegenWorld.addGeneratedCode(work, codeBuffer);
- return codeBuffer.toString();
+ backend.codegen(work);
}
}
« no previous file with comments | « no previous file | lib/compiler/implementation/dart_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698