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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/util/util.dart

Issue 27510002: Add a much simplified set implementation designed to waste little memory for small sets. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 dart2js.util; 5 library dart2js.util;
6 6
7 import "dart:collection"; 7 import "dart:collection";
8 import 'util_implementation.dart'; 8 import 'util_implementation.dart';
9 import 'characters.dart'; 9 import 'characters.dart';
10 10
11 export 'setlet.dart';
12
11 part 'link.dart'; 13 part 'link.dart';
12 part 'expensive_map.dart'; 14 part 'expensive_map.dart';
13 part 'expensive_set.dart'; 15 part 'expensive_set.dart';
14 16
15 /** 17 /**
16 * Tagging interface for classes from which source spans can be generated. 18 * Tagging interface for classes from which source spans can be generated.
17 */ 19 */
18 // TODO(johnniwinther): Find a better name. 20 // TODO(johnniwinther): Find a better name.
19 // TODO(ahe): How about "Bolt"? 21 // TODO(ahe): How about "Bolt"?
20 abstract class Spannable {} 22 abstract class Spannable {}
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 } 283 }
282 buffer.write(string); 284 buffer.write(string);
283 } 285 }
284 286
285 int computeHashCode(part1, [part2, part3, part4]) { 287 int computeHashCode(part1, [part2, part3, part4]) {
286 return (part1.hashCode 288 return (part1.hashCode
287 ^ part2.hashCode 289 ^ part2.hashCode
288 ^ part3.hashCode 290 ^ part3.hashCode
289 ^ part4.hashCode) & 0x3fffffff; 291 ^ part4.hashCode) & 0x3fffffff;
290 } 292 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698