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

Side by Side Diff: frog/lib/corelib_impl.dart

Issue 9107067: Work in progress: changes to interpretation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: work in progress Created 8 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « frog/lang.dart ('k') | frog/member.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 #library("dart:coreimpl"); 5 #library("dart:coreimpl");
6 6
7 #source("../../corelib/src/implementation/dual_pivot_quicksort.dart"); 7 #source("../../corelib/src/implementation/dual_pivot_quicksort.dart");
8 #source("../../corelib/src/implementation/duration_implementation.dart"); 8 #source("../../corelib/src/implementation/duration_implementation.dart");
9 #source("../../corelib/src/implementation/exceptions.dart"); 9 #source("../../corelib/src/implementation/exceptions.dart");
10 #source("../../corelib/src/implementation/future_implementation.dart"); 10 #source("../../corelib/src/implementation/future_implementation.dart");
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 ret[itemsAndKeys[i++]] = itemsAndKeys[i++]; 226 ret[itemsAndKeys[i++]] = itemsAndKeys[i++];
227 } 227 }
228 return ret; 228 return ret;
229 } 229 }
230 230
231 ImmutableMap _constMap(List itemsAndKeys) { 231 ImmutableMap _constMap(List itemsAndKeys) {
232 return new ImmutableMap(itemsAndKeys); 232 return new ImmutableMap(itemsAndKeys);
233 } 233 }
234 234
235 /** An immutable map. */ 235 /** An immutable map. */
236 // TODO(jmesserly): extends HashMapImplementation<K, V>?
236 class ImmutableMap<K, V> implements Map<K, V> { 237 class ImmutableMap<K, V> implements Map<K, V> {
237 final Map<K, V> _internal; 238 final Map<K, V> _internal;
238 239
239 ImmutableMap(List keyValuePairs) : _internal = _map(keyValuePairs); 240 ImmutableMap(List keyValuePairs) : _internal = _map(keyValuePairs);
240 241
241 V operator [](K key) => _internal[key]; 242 V operator [](K key) => _internal[key];
242 243
243 bool isEmpty() => _internal.isEmpty(); 244 bool isEmpty() => _internal.isEmpty();
244 245
245 int get length() => _internal.length; 246 int get length() => _internal.length;
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 } else if (isNaN()) { 504 } else if (isNaN()) {
504 if (other.isNaN()) { 505 if (other.isNaN()) {
505 return 0; 506 return 0;
506 } 507 }
507 return 1; 508 return 1;
508 } else { 509 } else {
509 return -1; 510 return -1;
510 } 511 }
511 } 512 }
512 } 513 }
OLDNEW
« no previous file with comments | « frog/lang.dart ('k') | frog/member.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698