Index: sdk/lib/_internal/lib/collection_patch.dart |
diff --git a/sdk/lib/_internal/lib/collection_patch.dart b/sdk/lib/_internal/lib/collection_patch.dart |
index 192dfd3e398506236c35b4e50febec5d529b840b..a7e7ee25f3029aa7ece7e59f3827117d9b2c11c8 100644 |
--- a/sdk/lib/_internal/lib/collection_patch.dart |
+++ b/sdk/lib/_internal/lib/collection_patch.dart |
@@ -4,6 +4,7 @@ |
// Patch file for dart:collection classes. |
import 'dart:_foreign_helper' show JS; |
+import 'dart:_js_helper' show fillLiteralMap, NoInline; |
patch class HashMap<K, V> { |
patch factory HashMap({ bool equals(K key1, K key2), |
@@ -488,6 +489,18 @@ patch class LinkedHashMap<K, V> { |
} |
patch factory LinkedHashMap.identity() = _LinkedIdentityHashMap<K, V>; |
+ |
+ // Private factory constructor called by generated code for map literals. |
+ @NoInline() |
+ factory LinkedHashMap._literal(List keyValuePairs) { |
+ return fillLiteralMap(keyValuePairs, new _LinkedHashMap<K, V>()); |
+ } |
+ |
+ // Private factory constructor called by generated code for map literals. |
+ @NoInline() |
+ factory LinkedHashMap._empty() { |
+ return new _LinkedHashMap<K, V>(); |
+ } |
} |
class _LinkedHashMap<K, V> implements LinkedHashMap<K, V> { |