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

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

Issue 1108913003: Use Map<FieldElement, ConstantValue> for fields in ConstructedConstantValue. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/ssa/optimize.dart ('k') | pkg/compiler/lib/src/util/util.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 590bb543a0a1ac000c3c177768eaf2fd8113b257..712b870408a4238867c9f677ddb8514f52f9359a 100644
--- a/pkg/compiler/lib/src/universe/universe.dart
+++ b/pkg/compiler/lib/src/universe/universe.dart
@@ -285,12 +285,8 @@ class CallStructure {
// TODO(johnniwinther): Cache hash code?
int get hashCode {
- int named = namedArguments.length;
- int hash = mixHashCodeBits(argumentCount, named);
- for (int i = 0; i < named; i++) {
- hash = mixHashCodeBits(hash, namedArguments[i].hashCode);
- }
- return hash;
+ return Hashing.listHash(namedArguments,
+ Hashing.objectHash(argumentCount, namedArguments.length));
}
bool operator ==(other) {
@@ -759,9 +755,9 @@ class Selector {
Name name,
CallStructure callStructure) {
// Add bits from name and kind.
- int hash = mixHashCodeBits(name.hashCode, kind.hashCode);
+ int hash = Hashing.mixHashCodeBits(name.hashCode, kind.hashCode);
// Add bits from the call structure.
- return mixHashCodeBits(hash, callStructure.hashCode);
+ return Hashing.mixHashCodeBits(hash, callStructure.hashCode);
}
String toString() {
@@ -810,7 +806,7 @@ class TypedSelector extends Selector {
.putIfAbsent(untyped, () => new Map<TypeMask, TypedSelector>());
TypedSelector result = map[mask];
if (result == null) {
- int hashCode = mixHashCodeBits(untyped.hashCode, mask.hashCode);
+ int hashCode = Hashing.mixHashCodeBits(untyped.hashCode, mask.hashCode);
result = map[mask] = new TypedSelector.internal(mask, untyped, hashCode);
}
return result;
« no previous file with comments | « pkg/compiler/lib/src/ssa/optimize.dart ('k') | pkg/compiler/lib/src/util/util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698