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

Unified Diff: runtime/vm/object.cc

Issue 2677473003: Fix an assertion about canonical types in the precompiler. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/precompiler.cc » ('j') | runtime/vm/precompiler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index a5e571f09a5a3e445cc8ff37bed64b3778c5c479..7b0e4cadb9d46fe32a771ea06dd592e900b6cf3e 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -4544,7 +4544,7 @@ static uint32_t FinalizeHash(uint32_t hash, intptr_t hashbits) {
hash += hash << 3;
hash ^= hash >> 11; // Logical shift, unsigned hash.
hash += hash << 15;
- hash &= ((static_cast<uintptr_t>(1) << hashbits) - 1);
+ hash &= (static_cast<uint32_t>(1) << hashbits) - 1;
return (hash == 0) ? 1 : hash;
}
@@ -17462,7 +17462,7 @@ RawAbstractType* Type::Canonicalize(TrailPtr trail) const {
SafepointMutexLocker ml(isolate->type_canonicalization_mutex());
CanonicalTypeSet table(zone, object_store->canonical_types());
type ^= table.GetOrNull(CanonicalTypeKey(*this));
- object_store->set_canonical_types(table.Release());
+ ASSERT(object_store->canonical_types() == table.Release().raw());
}
if (type.IsNull()) {
// The type was not found in the table. It is not canonical yet.
« no previous file with comments | « no previous file | runtime/vm/precompiler.cc » ('j') | runtime/vm/precompiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698