Index: sdk/lib/_internal/compiler/implementation/compiler.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/compiler.dart b/sdk/lib/_internal/compiler/implementation/compiler.dart |
index 636fcc530952bc44532781cfc2215c708c93adf1..5d4178b25d735ea4cd4182436de7948809686456 100644 |
--- a/sdk/lib/_internal/compiler/implementation/compiler.dart |
+++ b/sdk/lib/_internal/compiler/implementation/compiler.dart |
@@ -134,6 +134,7 @@ abstract class Compiler implements DiagnosticListener { |
LibraryElement coreLibrary; |
LibraryElement isolateLibrary; |
LibraryElement isolateHelperLibrary; |
+ LibraryElement mirrorsLibrary; |
LibraryElement jsHelperLibrary; |
LibraryElement interceptorsLibrary; |
LibraryElement foreignLibrary; |
@@ -218,6 +219,8 @@ abstract class Compiler implements DiagnosticListener { |
static const SourceString RUNTIME_TYPE = const SourceString('runtimeType'); |
static const SourceString START_ROOT_ISOLATE = |
const SourceString('startRootIsolate'); |
+ static const SourceString CREATE_MIRROR_SYSTEM = |
+ const SourceString('_createMirrorSystem'); |
bool enabledNoSuchMethod = false; |
bool enabledRuntimeType = false; |
bool enabledFunctionApply = false; |
@@ -421,6 +424,16 @@ abstract class Compiler implements DiagnosticListener { |
bool hasIsolateSupport() => isolateLibrary != null; |
+ void enableMirrorsSupport(LibraryElement element) { |
+ mirrorsLibrary = element.patch; |
+ enqueuer.resolution.addToWorkList( |
+ mirrorsLibrary.find(CREATE_MIRROR_SYSTEM)); |
+ enqueuer.codegen.addToWorkList( |
+ mirrorsLibrary.find(CREATE_MIRROR_SYSTEM)); |
+ } |
+ |
+ bool hasMirrorsSupport() => mirrorsLibrary != null; |
+ |
/** |
* This method is called before [library] import and export scopes have been |
* set up. |