Index: pkg/dev_compiler/lib/js/common/dart_sdk.js |
diff --git a/pkg/dev_compiler/lib/js/common/dart_sdk.js b/pkg/dev_compiler/lib/js/common/dart_sdk.js |
index c43422e066962c8a58e76ee0abc050dc75407028..25466a2c9463eb14370e62ff9da510005db7d1ca 100644 |
--- a/pkg/dev_compiler/lib/js/common/dart_sdk.js |
+++ b/pkg/dev_compiler/lib/js/common/dart_sdk.js |
@@ -119,6 +119,7 @@ |
let TimerTovoid = () => (TimerTovoid = dart.constFn(dart.functionType(dart.void, [async.Timer])))(); |
let MapOfdynamic$int = () => (MapOfdynamic$int = dart.constFn(core.Map$(dart.dynamic, core.int)))(); |
let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.functionType(dart.dynamic, [dart.dynamic])))(); |
+ let InternalMap = () => (InternalMap = dart.constFn(_js_helper.InternalMap$()))(); |
let JSArrayOfint = () => (JSArrayOfint = dart.constFn(_interceptors.JSArray$(core.int)))(); |
let ListOfint = () => (ListOfint = dart.constFn(core.List$(core.int)))(); |
let SyncIterator = () => (SyncIterator = dart.constFn(_js_helper.SyncIterator$()))(); |
@@ -10619,7 +10620,7 @@ |
} |
serializeMap(x) { |
let serializeTearOff = dart.bind(this, 'serialize'); |
- return JSArrayOfObject().of(['map', x[dartx.keys][dartx.map](dart.dynamic)(dynamicTodynamic()._check(serializeTearOff))[dartx.toList](), x[dartx.values][dartx.map](dart.dynamic)(dynamicTodynamic()._check(serializeTearOff))[dartx.toList]()]); |
+ return JSArrayOfObject().of(['map', x.keys[dartx.map](dart.dynamic)(dynamicTodynamic()._check(serializeTearOff))[dartx.toList](), x.values[dartx.map](dart.dynamic)(dynamicTodynamic()._check(serializeTearOff))[dartx.toList]()]); |
} |
serializeJSObject(x) { |
if (!!x.constructor && x.constructor !== Object) { |
@@ -10681,7 +10682,7 @@ |
serializeJSIndexable: dart.definiteFunctionType(dart.dynamic, [_interceptors.JSIndexable]), |
serializeArray: dart.definiteFunctionType(dart.dynamic, [_interceptors.JSArray]), |
serializeArrayInPlace: dart.definiteFunctionType(dart.dynamic, [_interceptors.JSArray]), |
- serializeMap: dart.definiteFunctionType(dart.dynamic, [core.Map]), |
+ serializeMap: dart.definiteFunctionType(dart.dynamic, [_js_helper.InternalMap]), |
serializeJSObject: dart.definiteFunctionType(dart.dynamic, [_interceptors.JSObject]), |
serializeWorkerSendPort: dart.definiteFunctionType(dart.dynamic, [_isolate_helper._WorkerSendPort]), |
serializeJsSendPort: dart.definiteFunctionType(dart.dynamic, [_isolate_helper._NativeJsSendPort]), |
@@ -10731,7 +10732,7 @@ |
} |
case "map": |
{ |
- return this.deserializeMap(x); |
+ return this.deserializeMap(_js_helper.InternalMap._check(x)); |
} |
case "sendport": |
{ |
@@ -10813,9 +10814,9 @@ |
return _interceptors.JSArray.markFixed(this.deserializeArrayInPlace(_interceptors.JSArray._check(result))); |
} |
deserializeMap(x) { |
- dart.assert(dart.equals(dart.dindex(x, 0), 'map')); |
- let keys = core.List._check(dart.dindex(x, 1)); |
- let values = core.List._check(dart.dindex(x, 2)); |
+ dart.assert(dart.equals(x.get(0), 'map')); |
+ let keys = core.List._check(x.get(1)); |
+ let values = core.List._check(x.get(2)); |
let result = dart.map(); |
this.deserializedObjects[dartx.add](result); |
keys = keys[dartx.map](dart.dynamic)(dart.bind(this, 'deserialize'))[dartx.toList](); |
@@ -10896,7 +10897,7 @@ |
deserializeExtendable: dart.definiteFunctionType(core.List, [dart.dynamic]), |
deserializeMutable: dart.definiteFunctionType(core.List, [dart.dynamic]), |
deserializeConst: dart.definiteFunctionType(core.List, [dart.dynamic]), |
- deserializeMap: dart.definiteFunctionType(core.Map, [dart.dynamic]), |
+ deserializeMap: dart.definiteFunctionType(core.Map, [_js_helper.InternalMap]), |
deserializeSendPort: dart.definiteFunctionType(isolate.SendPort, [dart.dynamic]), |
deserializeRawSendPort: dart.definiteFunctionType(isolate.SendPort, [dart.dynamic]), |
deserializeJSObject: dart.definiteFunctionType(dart.dynamic, [dart.dynamic]), |
@@ -10943,7 +10944,14 @@ |
constructors: () => ({new: dart.definiteFunctionType(_js_helper._Patch, [])}) |
}); |
_js_helper.patch = dart.const(new _js_helper._Patch()); |
- _js_helper.InternalMap = class InternalMap extends core.Object {}; |
+ _js_helper.InternalMap$ = dart.generic((K, V) => { |
+ let MapOfK$V = () => (MapOfK$V = dart.constFn(core.Map$(K, V)))(); |
+ class InternalMap extends core.Object {} |
+ dart.addTypeTests(InternalMap); |
+ InternalMap[dart.implements] = () => [MapOfK$V()]; |
+ return InternalMap; |
+ }); |
+ _js_helper.InternalMap = InternalMap(); |
_js_helper.Primitives = class Primitives extends core.Object { |
static initializeStatics(id) { |
_js_helper.Primitives.mirrorFunctionCacheName = dart.notNull(_js_helper.Primitives.mirrorFunctionCacheName) + dart.str`_${id}`; |
@@ -11865,6 +11873,7 @@ |
let KAndVTovoid = () => (KAndVTovoid = dart.constFn(dart.functionType(dart.void, [K, V])))(); |
let LinkedHashMapCellOfK$V = () => (LinkedHashMapCellOfK$V = dart.constFn(_js_helper.LinkedHashMapCell$(K, V)))(); |
let LinkedHashMapOfK$V = () => (LinkedHashMapOfK$V = dart.constFn(collection.LinkedHashMap$(K, V)))(); |
+ let InternalMapOfK$V = () => (InternalMapOfK$V = dart.constFn(_js_helper.InternalMap$(K, V)))(); |
let VoidToV = () => (VoidToV = dart.constFn(dart.functionType(V, [])))(); |
let KToV = () => (KToV = dart.constFn(dart.definiteFunctionType(V, [K])))(); |
let KTobool = () => (KTobool = dart.constFn(dart.definiteFunctionType(core.bool, [K])))(); |
@@ -12137,7 +12146,7 @@ |
} |
} |
dart.addTypeTests(JsLinkedHashMap); |
- JsLinkedHashMap[dart.implements] = () => [LinkedHashMapOfK$V(), _js_helper.InternalMap]; |
+ JsLinkedHashMap[dart.implements] = () => [LinkedHashMapOfK$V(), InternalMapOfK$V()]; |
dart.setSignature(JsLinkedHashMap, { |
constructors: () => ({ |
new: dart.definiteFunctionType(_js_helper.JsLinkedHashMap$(K, V), []), |
@@ -23463,6 +23472,7 @@ |
let _Es6MapIterableOfK = () => (_Es6MapIterableOfK = dart.constFn(collection._Es6MapIterable$(K)))(); |
let MapOfK$V = () => (MapOfK$V = dart.constFn(core.Map$(K, V)))(); |
let KAndVTovoid = () => (KAndVTovoid = dart.constFn(dart.functionType(dart.void, [K, V])))(); |
+ let InternalMapOfK$V = () => (InternalMapOfK$V = dart.constFn(_js_helper.InternalMap$(K, V)))(); |
let _Es6MapIterableOfV = () => (_Es6MapIterableOfV = dart.constFn(collection._Es6MapIterable$(V)))(); |
let VoidToV = () => (VoidToV = dart.constFn(dart.functionType(V, [])))(); |
let KAndVTovoid$ = () => (KAndVTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [K, V])))(); |
@@ -23551,7 +23561,7 @@ |
return collection.Maps.mapToString(this); |
} |
} |
- _Es6LinkedIdentityHashMap[dart.implements] = () => [_js_helper.InternalMap]; |
+ _Es6LinkedIdentityHashMap[dart.implements] = () => [InternalMapOfK$V()]; |
dart.setSignature(_Es6LinkedIdentityHashMap, { |
constructors: () => ({new: dart.definiteFunctionType(collection._Es6LinkedIdentityHashMap$(K, V), [])}), |
fields: () => ({ |