| 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 cf6c61c0fadcb3e4df52d549651af7973ef94f5a..64d62e5ddb59080d42670c5b33adced238e82dfa 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| @@ -102,8 +102,6 @@ class JavaScriptBackend extends Backend {
|
| ClassElement mapLiteralClass;
|
| ClassElement constMapLiteralClass;
|
| ClassElement typeVariableClass;
|
| - Element mapLiteralConstructor;
|
| - Element mapLiteralConstructorEmpty;
|
|
|
| ClassElement noSideEffectsClass;
|
| ClassElement noThrowsClass;
|
| @@ -730,6 +728,7 @@ class JavaScriptBackend extends Backend {
|
| // For map literals, the dependency between the implementation class
|
| // and [Map] is not visible, so we have to add it manually.
|
| rti.registerRtiDependency(mapLiteralClass, cls);
|
| + enqueueInResolution(getMapMaker(), elements);
|
| } else if (cls == compiler.boundClosureClass) {
|
| // TODO(ngeoffray): Move the bound closure class in the
|
| // backend.
|
| @@ -738,24 +737,6 @@ class JavaScriptBackend extends Backend {
|
| enqueue(enqueuer, getNativeInterceptorMethod, elements);
|
| enqueueClass(enqueuer, jsInterceptorClass, compiler.globalDependencies);
|
| enqueueClass(enqueuer, jsPlainJavaScriptObjectClass, elements);
|
| - } else if (cls == mapLiteralClass) {
|
| - // For map literals, the dependency between the implementation class
|
| - // and [Map] is not visible, so we have to add it manually.
|
| - Element getFactory(String name, int arity) {
|
| - return mapLiteralClass.patch.lookupConstructor(
|
| - new Selector.callConstructor(
|
| - name, mapLiteralClass.getLibrary(), arity),
|
| - (element) {
|
| - compiler.internalError(mapLiteralClass,
|
| - "Map literal class $mapLiteralClass missing "
|
| - "'$name' constructor"
|
| - " ${mapLiteralClass.constructors}");
|
| - });
|
| - }
|
| - mapLiteralConstructor = getFactory('_literal', 1);
|
| - mapLiteralConstructorEmpty = getFactory('_empty', 0);
|
| - enqueueInResolution(mapLiteralConstructor, elements);
|
| - enqueueInResolution(mapLiteralConstructorEmpty, elements);
|
| }
|
| }
|
| if (cls == compiler.closureClass) {
|
| @@ -1467,6 +1448,10 @@ class JavaScriptBackend extends Backend {
|
| return compiler.findHelper('getTraceFromException');
|
| }
|
|
|
| + Element getMapMaker() {
|
| + return compiler.findHelper('makeLiteralMap');
|
| + }
|
| +
|
| Element getSetRuntimeTypeInfo() {
|
| return compiler.findHelper('setRuntimeTypeInfo');
|
| }
|
| @@ -1901,3 +1886,4 @@ class Dependency {
|
|
|
| const Dependency(this.constant, this.user);
|
| }
|
| +
|
|
|