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

Unified Diff: lib/runtime/dart_sdk.js

Side-by-side diff isn't available for this file because of its large size.
Issue 1946663002: Implement Map.unmodifiable (Closed) Base URL: https://github.com/dart-lang/dev_compiler@master
Patch Set: Created 4 years, 7 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:
Download patch
« no previous file with comments | « no previous file | tool/input_sdk/lib/core/map.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart_sdk.js
diff --git a/lib/runtime/dart_sdk.js b/lib/runtime/dart_sdk.js
index 6a0b7a9077900048b274380e3f246e54db808be0..6dc9efc15a537b2a32feafde66ce1dc07aef4a1d 100644
--- a/lib/runtime/dart_sdk.js
+++ b/lib/runtime/dart_sdk.js
@@ -27246,6 +27246,9 @@ dart_library.library('dart_sdk', null, /* Imports */[
static from(other) {
return collection.LinkedHashMap$(K, V).from(other);
}
+ static unmodifiable(other) {
+ return new (collection.UnmodifiableMapView$(K, V))(core.Map$(K, V).from(other));
+ }
static identity() {
return collection.LinkedHashMap$(K, V).identity();
}
@@ -27260,6 +27263,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
constructors: () => ({
new: [core.Map$(K, V), []],
from: [core.Map$(K, V), [core.Map]],
+ unmodifiable: [core.Map$(K, V), [core.Map]],
identity: [core.Map$(K, V), []],
fromIterable: [core.Map$(K, V), [core.Iterable], {key: dart.functionType(K, [dart.dynamic]), value: dart.functionType(V, [dart.dynamic])}],
fromIterables: [core.Map$(K, V), [core.Iterable$(K), core.Iterable$(V)]]
« no previous file with comments | « no previous file | tool/input_sdk/lib/core/map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698