| Index: pkg/front_end/lib/src/fasta/target_implementation.dart
|
| diff --git a/pkg/front_end/lib/src/fasta/target_implementation.dart b/pkg/front_end/lib/src/fasta/target_implementation.dart
|
| index 4400b123ad2e394be8d782f9c0179897d85098c9..f2e2defe1c7a3b410f236bfb6b768fe89bfe6511 100644
|
| --- a/pkg/front_end/lib/src/fasta/target_implementation.dart
|
| +++ b/pkg/front_end/lib/src/fasta/target_implementation.dart
|
| @@ -5,9 +5,13 @@
|
| library fasta.target_implementation;
|
|
|
| import 'builder/builder.dart' show
|
| + Builder,
|
| ClassBuilder,
|
| LibraryBuilder;
|
|
|
| +import 'loader.dart' show
|
| + Loader;
|
| +
|
| import 'target.dart' show
|
| Target;
|
|
|
| @@ -20,6 +24,7 @@ import 'translate_uri.dart' show
|
| /// Provides the implementation details used by a loader for a target.
|
| abstract class TargetImplementation extends Target {
|
| final TranslateUri uriTranslator;
|
| + Builder cachedCompileTimeError;
|
|
|
| TargetImplementation(Ticker ticker, this.uriTranslator)
|
| : super(ticker);
|
| @@ -40,4 +45,13 @@ abstract class TargetImplementation extends Target {
|
| void breakCycle(ClassBuilder cls);
|
|
|
| Uri translateUri(Uri uri) => uriTranslator.translate(uri);
|
| +
|
| + /// Returns a reference to the constructor used for creating a compile-time
|
| + /// error. The constructor is expected to accept a single argument of type
|
| + /// String, which is the compile-time error message.
|
| + Builder getCompileTimeError(Loader loader) {
|
| + if (cachedCompileTimeError != null) return cachedCompileTimeError;
|
| + return cachedCompileTimeError =
|
| + loader.coreLibrary.getConstructor("_CompileTimeError", isPrivate: true);
|
| + }
|
| }
|
|
|