| Index: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| index 1b6ca007e6b3bcca2b78d518acbe003a0ae82fbf..b1ee024886738434fd19a09ed126fb074e265ac0 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| @@ -340,9 +340,6 @@ class JavaScriptBackend extends Backend {
|
| /// List of elements that the backend may use.
|
| final Set<Element> helpersUsed = new Set<Element>();
|
|
|
| - /// Set of typedefs that are used as type literals.
|
| - final Set<TypedefElement> typedefTypeLiterals = new Set<TypedefElement>();
|
| -
|
| /// All the checked mode helpers.
|
| static const checkedModeHelpers = CheckedModeHelper.helpers;
|
|
|
| @@ -1937,11 +1934,13 @@ class JavaScriptBackend extends Backend {
|
| if (foundClosure) {
|
| reflectableMembers.add(closureClass);
|
| }
|
| - // It would be nice to have a better means to select
|
| Set<Element> closurizedMembers = compiler.resolverWorld.closurizedMembers;
|
| if (closurizedMembers.any(reflectableMembers.contains)) {
|
| reflectableMembers.add(boundClosureClass);
|
| }
|
| + // Add typedefs.
|
| + reflectableMembers
|
| + .addAll(compiler.world.allTypedefs.where(referencedFromMirrorSystem));
|
| // Register all symbols of reflectable elements
|
| for (Element element in reflectableMembers) {
|
| symbolsUsed.add(element.name);
|
| @@ -2170,7 +2169,7 @@ class JavaScriptionResolutionCallbacks extends ResolutionCallbacks {
|
| // when reflection is used. However, as long as we disable tree-shaking
|
| // eagerly it doesn't matter.
|
| if (type.isTypedef) {
|
| - backend.typedefTypeLiterals.add(type.element);
|
| + backend.compiler.world.allTypedefs.add(type.element);
|
| }
|
| backend.customElementsAnalysis.registerTypeLiteral(type, registry);
|
| }
|
|
|