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

Side by Side Diff: sdk/lib/_internal/compiler/js_lib/constant_map.dart

Issue 1207723003: Revert "JSInvocationMirror - return unmodifiable list or map" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/js_lib/js_helper.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of _js_helper; 5 part of _js_helper;
6 6
7 class ConstantMapView<K, V> extends UnmodifiableMapView 7 class ConstantMapView<K, V> extends UnmodifiableMapView
8 implements ConstantMap { 8 implements ConstantMap {
9 ConstantMapView(Map base) : super(base); 9 ConstantMapView(Map base) : super(base);
10 } 10 }
11 11
12 abstract class ConstantMap<K, V> implements Map<K, V> { 12 abstract class ConstantMap<K, V> implements Map<K, V> {
13 // Used to create unmodifiable maps from other maps. 13 // Used to create unmodifiable maps from other maps.
14 factory ConstantMap.from(Map other) { 14 factory ConstantMap.from(Map other) {
15 List keys = other.keys.toList(); 15 List keys = other.keys.toList();
16 bool allStrings = true; 16 bool allStrings = true;
17 for (var k in keys) { 17 for (var k in keys) {
18 if (k is! String) { 18 if (k is! String) {
19 allStrings = false; 19 allStrings = false;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 Iterable<K> get keys { 179 Iterable<K> get keys {
180 return _getMap().keys; 180 return _getMap().keys;
181 } 181 }
182 182
183 Iterable<V> get values { 183 Iterable<V> get values {
184 return _getMap().values; 184 return _getMap().values;
185 } 185 }
186 186
187 int get length => _getMap().length; 187 int get length => _getMap().length;
188 } 188 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/js_lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698