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: src/crankshaft/hydrogen.cc

Issue 1636013002: Replace HeapType with a non-templated FieldType class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix tracing of generalizations Created 4 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
Index: src/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index 214b65c676c61715545130222d7290e8a0d64c11..38b1079c879e425e5f77e817b756a7846514c65e 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -6360,14 +6360,14 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LoadFieldMaps(
field_type_ = HType::Tagged();
// Figure out the field type from the accessor map.
- Handle<HeapType> field_type = GetFieldTypeFromMap(map);
+ Handle<FieldType> field_type = GetFieldTypeFromMap(map);
// Collect the (stable) maps from the field type.
- int num_field_maps = field_type->NumClasses();
+ int num_field_maps = field_type->ClassCount();
if (num_field_maps > 0) {
DCHECK(access_.representation().IsHeapObject());
field_maps_.Reserve(num_field_maps, zone());
- HeapType::Iterator<Map> it = field_type->Classes();
+ FieldType::Iterator it = field_type->Classes();
while (!it.Done()) {
Handle<Map> field_map = it.Current();
if (!field_map->is_stable()) {
@@ -6381,14 +6381,14 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LoadFieldMaps(
if (field_maps_.is_empty()) {
// Store is not safe if the field map was cleared.
- return IsLoad() || !field_type->Is(HeapType::None());
+ return IsLoad() || !field_type->IsNone();
}
field_maps_.Sort();
DCHECK_EQ(num_field_maps, field_maps_.length());
- // Determine field HType from field HeapType.
- field_type_ = HType::FromType<HeapType>(field_type);
+ // Determine field HType from field type.
+ field_type_ = HType::FromFieldType(field_type, zone());
DCHECK(field_type_.IsHeapObject());
// Add dependency on the map that introduced the field.

Powered by Google App Engine
This is Rietveld 408576698