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

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

Issue 1127533002: Add Map.unmodifiable constructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: sdk/lib/_internal/compiler/js_lib/core_patch.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/core_patch.dart b/sdk/lib/_internal/compiler/js_lib/core_patch.dart
index a3f151312f3ba21692967657af164c8164aa9acb..03d2dab6b5406ff4c2eeed1b3fe336c6772c3d54 100644
--- a/sdk/lib/_internal/compiler/js_lib/core_patch.dart
+++ b/sdk/lib/_internal/compiler/js_lib/core_patch.dart
@@ -13,6 +13,7 @@ import 'dart:_js_helper' show patch,
jsonEncodeNative,
JSSyntaxRegExp,
Primitives,
+ ConstantMap,
stringJoinUnchecked,
objectHashCode;
@@ -288,6 +289,12 @@ class List<E> {
}
@patch
+class Map<K, V> {
+ @patch
+ factory Map.unmodifiable(Map other) = ConstantMap<K, V>.from;
+}
+
+@patch
class String {
@patch
factory String.fromCharCodes(Iterable<int> charCodes,

Powered by Google App Engine
This is Rietveld 408576698