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

Unified Diff: pkg/compiler/lib/src/universe/universe.dart

Issue 790023004: Remove static state. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/native/enqueue.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/universe/universe.dart
diff --git a/pkg/compiler/lib/src/universe/universe.dart b/pkg/compiler/lib/src/universe/universe.dart
index c3249d1d925a8421e7249382e43c3a17e9d1cbb0..34d6f589f9a1f1f34bc3a6ddd58c31d1b5d8d9ce 100644
--- a/pkg/compiler/lib/src/universe/universe.dart
+++ b/pkg/compiler/lib/src/universe/universe.dart
@@ -781,8 +781,6 @@ class TypedSelector extends Selector {
assert(asUntyped.mask == null);
}
- static Map<Selector, Map<TypeMask, TypedSelector>> canonicalizedValues =
- new Map<Selector, Map<TypeMask, TypedSelector>>();
factory TypedSelector(TypeMask mask, Selector selector, World world) {
if (!world.hasClosedWorldAssumption) {
@@ -797,8 +795,8 @@ class TypedSelector extends Selector {
assert(world.isClosed || mask.isExact);
if (selector.mask == mask) return selector;
Selector untyped = selector.asUntyped;
- Map<TypeMask, TypedSelector> map = canonicalizedValues.putIfAbsent(untyped,
- () => new Map<TypeMask, TypedSelector>());
+ Map<TypeMask, TypedSelector> map = world.canonicalizedValues
+ .putIfAbsent(untyped, () => new Map<TypeMask, TypedSelector>());
TypedSelector result = map[mask];
if (result == null) {
int hashCode = Selector.mixHashCodeBits(untyped.hashCode, mask.hashCode);
« no previous file with comments | « pkg/compiler/lib/src/native/enqueue.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698