| Index: dart/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| diff --git a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| index 1aa47b763707039c52ea28dda80d0bcf9c61a5b0..504ef854c29bd948236539a81b581165d8c009b4 100644
|
| --- a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| +++ b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| @@ -331,6 +331,9 @@ abstract class Compiler implements DiagnosticListener {
|
| */
|
| final String globalJsName;
|
|
|
| + /// Emit terse diagnostics without howToFix.
|
| + final bool terseDiagnostics;
|
| +
|
| final api.CompilerOutputProvider outputProvider;
|
|
|
| bool disableInlining = false;
|
| @@ -387,6 +390,9 @@ abstract class Compiler implements DiagnosticListener {
|
| // Initialized when symbolImplementationClass has been resolved.
|
| FunctionElement symbolValidatedConstructor;
|
|
|
| + // Initialized when mirrorsUsedClass has been resolved.
|
| + FunctionElement mirrorsUsedConstructor;
|
| +
|
| // Initialized when dart:mirrors is loaded.
|
| ClassElement deferredLibraryClass;
|
|
|
| @@ -525,6 +531,7 @@ abstract class Compiler implements DiagnosticListener {
|
| this.sourceMapUri: null,
|
| this.buildId: UNDETERMINED_BUILD_ID,
|
| this.globalJsName: r'$',
|
| + this.terseDiagnostics: false,
|
| outputProvider,
|
| List<String> strips: const []})
|
| : this.analyzeOnly = analyzeOnly || analyzeSignaturesOnly,
|
| @@ -746,6 +753,8 @@ abstract class Compiler implements DiagnosticListener {
|
| } else if (symbolImplementationClass == cls) {
|
| symbolValidatedConstructor = symbolImplementationClass.lookupConstructor(
|
| symbolValidatedConstructorSelector);
|
| + } else if (mirrorsUsedClass == cls) {
|
| + mirrorsUsedConstructor = cls.constructors.head;
|
| }
|
| }
|
|
|
| @@ -801,7 +810,9 @@ abstract class Compiler implements DiagnosticListener {
|
| '$missingHelperClasses');
|
| }
|
|
|
| - types = new Types(this, dynamicClass);
|
| + if (types == null) {
|
| + types = new Types(this, dynamicClass);
|
| + }
|
| backend.initializeHelperClasses();
|
|
|
| dynamicClass.ensureResolved(this);
|
| @@ -1171,7 +1182,7 @@ abstract class Compiler implements DiagnosticListener {
|
| MessageKind errorCode,
|
| [Map arguments = const {}]) {
|
| reportMessage(spanFromSpannable(node),
|
| - errorCode.error(arguments),
|
| + errorCode.error(arguments, terseDiagnostics),
|
| api.Diagnostic.ERROR);
|
| }
|
|
|
| @@ -1187,21 +1198,21 @@ abstract class Compiler implements DiagnosticListener {
|
| void reportWarningCode(Spannable node, MessageKind errorCode,
|
| [Map arguments = const {}]) {
|
| reportMessage(spanFromSpannable(node),
|
| - errorCode.error(arguments),
|
| + errorCode.error(arguments, terseDiagnostics),
|
| api.Diagnostic.WARNING);
|
| }
|
|
|
| void reportInfo(Spannable node, MessageKind errorCode,
|
| [Map arguments = const {}]) {
|
| reportMessage(spanFromSpannable(node),
|
| - errorCode.error(arguments),
|
| + errorCode.error(arguments, terseDiagnostics),
|
| api.Diagnostic.INFO);
|
| }
|
|
|
| void reportHint(Spannable node, MessageKind errorCode,
|
| [Map arguments = const {}]) {
|
| reportMessage(spanFromSpannable(node),
|
| - errorCode.error(arguments),
|
| + errorCode.error(arguments, terseDiagnostics),
|
| api.Diagnostic.HINT);
|
| }
|
|
|
|
|