| Index: pkg/compiler/lib/src/js_backend/backend.dart
|
| diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
|
| index 75f3dab49e198e7a3d9bf2656793766d72e2e1c4..c23ec335fc47e3410a31785bd85798088e137e4c 100644
|
| --- a/pkg/compiler/lib/src/js_backend/backend.dart
|
| +++ b/pkg/compiler/lib/src/js_backend/backend.dart
|
| @@ -2670,17 +2670,23 @@ class JavaScriptResolutionCallbacks extends ResolutionCallbacks {
|
| registerBackendInstantiation(backend.compiler.listClass, registry);
|
| }
|
|
|
| - void onConstantMap(Registry registry) {
|
| + void onMapLiteral(ResolutionRegistry registry,
|
| + DartType type,
|
| + bool isConstant) {
|
| assert(registry.isForResolution);
|
| void enqueue(String name) {
|
| Element e = backend.find(backend.jsHelperLibrary, name);
|
| registerBackendInstantiation(e, registry);
|
| }
|
|
|
| - enqueue(JavaScriptMapConstant.DART_CLASS);
|
| - enqueue(JavaScriptMapConstant.DART_PROTO_CLASS);
|
| - enqueue(JavaScriptMapConstant.DART_STRING_CLASS);
|
| - enqueue(JavaScriptMapConstant.DART_GENERAL_CLASS);
|
| + if (isConstant) {
|
| + enqueue(JavaScriptMapConstant.DART_CLASS);
|
| + enqueue(JavaScriptMapConstant.DART_PROTO_CLASS);
|
| + enqueue(JavaScriptMapConstant.DART_STRING_CLASS);
|
| + enqueue(JavaScriptMapConstant.DART_GENERAL_CLASS);
|
| + } else {
|
| + registry.registerInstantiatedType(type);
|
| + }
|
| }
|
|
|
| /// Called when resolving the `Symbol` constructor.
|
|
|