| Index: pkg/compiler/lib/src/compiler.dart
|
| diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
|
| index 4646013fb6bf24eeb9adbc2abb3bdad333b56854..673fa5ba79aac85fd2d5d9284b569acc53350f70 100644
|
| --- a/pkg/compiler/lib/src/compiler.dart
|
| +++ b/pkg/compiler/lib/src/compiler.dart
|
| @@ -273,9 +273,7 @@ abstract class Backend {
|
| return new native.NativeEnqueuer();
|
| }
|
|
|
| - /// Generates the output and returns the total size of the generated code.
|
| - int assembleProgram();
|
| -
|
| + void assembleProgram();
|
| List<CompilerTask> get tasks;
|
|
|
| void onResolutionComplete() {}
|
| @@ -629,6 +627,7 @@ abstract class Compiler implements DiagnosticListener {
|
| final Stopwatch totalCompileTime = new Stopwatch();
|
| int nextFreeClassId = 0;
|
| World world;
|
| + String assembledCode;
|
| Types types;
|
| _CompilerCoreTypes _coreTypes;
|
|
|
| @@ -1080,6 +1079,8 @@ 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);
|
| @@ -1614,14 +1615,17 @@ abstract class Compiler implements DiagnosticListener {
|
|
|
| if (compilationFailed) return;
|
|
|
| - int programSize = backend.assembleProgram();
|
| + backend.assembleProgram();
|
|
|
| if (dumpInfo) {
|
| - dumpInfoTask.reportSize(programSize);
|
| dumpInfoTask.dumpInfo();
|
| }
|
|
|
| checkQueues();
|
| +
|
| + if (compilationFailed) {
|
| + assembledCode = null; // Signals failure.
|
| + }
|
| }
|
|
|
| void fullyEnqueueLibrary(LibraryElement library, Enqueuer world) {
|
|
|