| Index: dart/lib/compiler/implementation/compiler.dart
|
| diff --git a/dart/lib/compiler/implementation/compiler.dart b/dart/lib/compiler/implementation/compiler.dart
|
| index 6a78ae5e1f127347aa970adbc7507e675cef653c..5cb19337cb4fcc308c118fca646646309eb21ecd 100644
|
| --- a/dart/lib/compiler/implementation/compiler.dart
|
| +++ b/dart/lib/compiler/implementation/compiler.dart
|
| @@ -303,6 +303,8 @@ class Compiler implements DiagnosticListener {
|
| static final int PHASE_RECOMPILING = 3;
|
| int phase;
|
|
|
| + bool compilationFailed = false;
|
| +
|
| Compiler([this.tracer = const Tracer(),
|
| this.enableTypeAssertions = false,
|
| this.enableUserAssertions = false,
|
| @@ -548,6 +550,8 @@ class Compiler implements DiagnosticListener {
|
| processQueue(enqueuer.resolution, main);
|
| log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.');
|
|
|
| + if (compilationFailed) return;
|
| +
|
| log('Compiling...');
|
| phase = PHASE_COMPILING;
|
| processQueue(enqueuer.codegen, main);
|
| @@ -557,6 +561,8 @@ class Compiler implements DiagnosticListener {
|
| processRecompilationQueue(enqueuer.codegen);
|
| log('Compiled ${codegenWorld.generatedCode.length} methods.');
|
|
|
| + if (compilationFailed) return;
|
| +
|
| backend.assembleProgram();
|
|
|
| checkQueues();
|
| @@ -755,7 +761,7 @@ class Compiler implements DiagnosticListener {
|
| }
|
| SourceSpan span = spanFromNode(node);
|
|
|
| - reportDiagnostic(span, 'Warning: $message', api.Diagnostic.WARNING );
|
| + reportDiagnostic(span, 'Warning: $message', api.Diagnostic.WARNING);
|
| }
|
|
|
| reportError(Node node, var message) {
|
| @@ -764,6 +770,14 @@ class Compiler implements DiagnosticListener {
|
| throw new CompilerCancelledException(message.toString());
|
| }
|
|
|
| + void reportMessage(SourceSpan span,
|
| + Diagnostic message,
|
| + api.Diagnostic kind) {
|
| + // TODO(ahe): The names Diagnostic and api.Diagnostic are in
|
| + // conflict. Fix it.
|
| + reportDiagnostic(span, "$message", kind);
|
| + }
|
| +
|
| abstract void reportDiagnostic(SourceSpan span, String message,
|
| api.Diagnostic kind);
|
|
|
|
|