Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(600)

Unified Diff: sdk/lib/_internal/compiler/js_lib/collection_patch.dart

Issue 1051223003: dartj2s: add constructor helpers for map literals with no type parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added comment. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/compiler/dart2js/mock_libraries.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/js_lib/collection_patch.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/collection_patch.dart b/sdk/lib/_internal/compiler/js_lib/collection_patch.dart
index 9242d392644fff7ec59795c0debf71fa905b9f4b..42b7fc9ec77d975c3d207021ae6b0fc03f7fd8bf 100644
--- a/sdk/lib/_internal/compiler/js_lib/collection_patch.dart
+++ b/sdk/lib/_internal/compiler/js_lib/collection_patch.dart
@@ -529,6 +529,17 @@ class LinkedHashMap<K, V> {
factory LinkedHashMap._empty() {
return new JsLinkedHashMap<K, V>();
}
+
+ // Private factory static function called by generated code for map literals.
+ // This version is for map literals without type parameters.
+ @NoInline()
+ static _makeEmpty() => new JsLinkedHashMap();
+
+ // Private factory static function called by generated code for map literals.
+ // This version is for map literals without type parameters.
+ @NoInline()
+ static _makeLiteral(keyValuePairs) =>
+ fillLiteralMap(keyValuePairs, new JsLinkedHashMap());
}
class _LinkedIdentityHashMap<K, V> extends JsLinkedHashMap<K, V> {
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/compiler/dart2js/mock_libraries.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698