Chromium Code Reviews| 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(); |
| } |
| } |