Chromium Code Reviews| Index: pkg/compiler/lib/src/compiler.dart |
| diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart |
| index 673fa5ba79aac85fd2d5d9284b569acc53350f70..54638da845cc165836fb3c75f5038abbc8d594d5 100644 |
| --- a/pkg/compiler/lib/src/compiler.dart |
| +++ b/pkg/compiler/lib/src/compiler.dart |
| @@ -273,7 +273,9 @@ abstract class Backend { |
| return new native.NativeEnqueuer(); |
| } |
| - void assembleProgram(); |
| + /// Generates the output and returns the total size of the generated code. |
| + int assembleProgram(); |
| + |
| List<CompilerTask> get tasks; |
| void onResolutionComplete() {} |
| @@ -627,7 +629,6 @@ abstract class Compiler implements DiagnosticListener { |
| final Stopwatch totalCompileTime = new Stopwatch(); |
| int nextFreeClassId = 0; |
| World world; |
| - String assembledCode; |
| Types types; |
| _CompilerCoreTypes _coreTypes; |
| @@ -1079,8 +1080,6 @@ abstract class Compiler implements DiagnosticListener { |
| } |
| void internalError(Spannable node, reason) { |
| - assembledCode = null; // Compilation failed. Make sure that we |
| - // don't return a bogus result. |
| String message = tryToString(reason); |
| reportDiagnosticInternal( |
| node, MessageKind.GENERIC, {'text': message}, api.Diagnostic.CRASH); |
| @@ -1615,17 +1614,13 @@ abstract class Compiler implements DiagnosticListener { |
| if (compilationFailed) return; |
| - backend.assembleProgram(); |
| + int programSize = backend.assembleProgram(); |
| if (dumpInfo) { |
| - dumpInfoTask.dumpInfo(); |
| + dumpInfoTask.dumpInfo(programSize); |
|
floitsch
2015/01/05 10:39:33
dumpInfo(programSize) feels wrong.
task.setSize ?
Johnni Winther
2015/01/05 13:54:10
Done.
|
| } |
| checkQueues(); |
| - |
| - if (compilationFailed) { |
| - assembledCode = null; // Signals failure. |
| - } |
| } |
| void fullyEnqueueLibrary(LibraryElement library, Enqueuer world) { |