Chromium Code Reviews| 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..c48aa7be42603502222893e1163bc0abbc1e0532 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,17 @@ patch class LinkedHashMap<K, V> { |
| } |
| patch factory LinkedHashMap.identity() = _LinkedIdentityHashMap<K, V>; |
| + |
| + // Private factory constructors called by generated code for map literals. |
| + @NoInline() |
| + factory LinkedHashMap._literal(List keyValuePairs) { |
| + var map = new _LinkedHashMap<K, V>(); |
|
floitsch
2014/04/08 11:53:17
delete line
sra1
2014/04/08 17:55:01
Done.
|
| + return fillLiteralMap(keyValuePairs, new _LinkedHashMap<K, V>()); |
| + } |
| + @NoInline() |
| + factory LinkedHashMap._empty() { |
| + return new _LinkedHashMap<K, V>(); |
| + } |
| } |
| class _LinkedHashMap<K, V> implements LinkedHashMap<K, V> { |