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

Unified Diff: runtime/vm/precompiler.cc

Issue 2677473003: Fix an assertion about canonical types in the precompiler. (Closed)
Patch Set: add same assertion for type arguments 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 | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/precompiler.cc
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
index 13c2b686ba2ada7d417bdada49ba38efb8234fbd..29b4d22b865935ce91868df2e9cda8dde497676d 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -2677,7 +2677,7 @@ void Precompiler::RehashTypes() {
{
CanonicalTypeSet types_table(Z, object_store->canonical_types());
types_array = HashTables::ToArray(types_table, false);
- for (intptr_t i = 0; i < (types_array.Length() - 1); i++) {
+ for (intptr_t i = 0; i < types_array.Length(); i++) {
type ^= types_array.At(i);
types.Add(type);
}
@@ -2690,7 +2690,7 @@ void Precompiler::RehashTypes() {
for (intptr_t i = 0; i < types.Length(); i++) {
type ^= types.At(i);
bool present = types_table.Insert(type);
- ASSERT(!present);
+ ASSERT(!present || type.IsRecursive());
}
object_store->set_canonical_types(types_table.Release());
@@ -2703,7 +2703,7 @@ void Precompiler::RehashTypes() {
CanonicalTypeArgumentsSet typeargs_table(
Z, object_store->canonical_type_arguments());
typeargs_array = HashTables::ToArray(typeargs_table, false);
- for (intptr_t i = 0; i < (typeargs_array.Length() - 1); i++) {
+ for (intptr_t i = 0; i < typeargs_array.Length(); i++) {
typearg ^= typeargs_array.At(i);
typeargs.Add(typearg);
}
@@ -2717,7 +2717,7 @@ void Precompiler::RehashTypes() {
for (intptr_t i = 0; i < typeargs.Length(); i++) {
typearg ^= typeargs.At(i);
bool present = typeargs_table.Insert(typearg);
- ASSERT(!present);
+ ASSERT(!present || typearg.IsRecursive());
}
object_store->set_canonical_type_arguments(typeargs_table.Release());
}
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698