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

Side by Side Diff: pkg/compiler/lib/src/cache_strategy.dart

Issue 2668233002: Remove code supporting incremental compilation in dart2js (Closed)
Patch Set: Created 3 years, 10 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 | « pkg/compiler/lib/src/apiimpl.dart ('k') | pkg/compiler/lib/src/closure.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
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.
4
5 import 'dart:collection' show HashMap, HashSet;
6
7 /**
8 * Helper class for allocating sets and maps appropriate for caching objects
9 * that can be assumed to be canonicalized.
10 *
11 * When compiling dart2js to JavaScript, profiling reveals that identity maps
12 * and sets have superior performance. However, we know that [Object.hashCode]
13 * is slow on the Dart VM. This class is meant to encapsulate the decision
14 * about which data structure is best, and we anticipate specific subclasses
15 * for JavaScript and Dart VM in the future.
16 */
17 class CacheStrategy {
18 final bool hasIncrementalSupport;
19
20 CacheStrategy(this.hasIncrementalSupport);
21
22 Map newMap() => hasIncrementalSupport ? new HashMap.identity() : null;
23
24 Set newSet() => hasIncrementalSupport ? new HashSet.identity() : null;
25 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/apiimpl.dart ('k') | pkg/compiler/lib/src/closure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698