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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 1633213003: Remove FieldType::Iterator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup 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
« no previous file with comments | « no previous file | src/ic/arm/handler-compiler-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index 38b1079c879e425e5f77e817b756a7846514c65e..57478f7cc6a504fc6f38e5ace3f8aa1f2d9759d8 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -6363,19 +6363,11 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LoadFieldMaps(
Handle<FieldType> field_type = GetFieldTypeFromMap(map);
// Collect the (stable) maps from the field type.
- int num_field_maps = field_type->ClassCount();
- if (num_field_maps > 0) {
+ if (field_type->IsClass()) {
DCHECK(access_.representation().IsHeapObject());
- field_maps_.Reserve(num_field_maps, zone());
- FieldType::Iterator it = field_type->Classes();
- while (!it.Done()) {
- Handle<Map> field_map = it.Current();
- if (!field_map->is_stable()) {
- field_maps_.Clear();
- break;
- }
+ Handle<Map> field_map = field_type->AsClass();
+ if (field_map->is_stable()) {
field_maps_.Add(field_map, zone());
- it.Advance();
}
}
@@ -6384,9 +6376,6 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LoadFieldMaps(
return IsLoad() || !field_type->IsNone();
}
- field_maps_.Sort();
- DCHECK_EQ(num_field_maps, field_maps_.length());
-
// Determine field HType from field type.
field_type_ = HType::FromFieldType(field_type, zone());
DCHECK(field_type_.IsHeapObject());
« no previous file with comments | « no previous file | src/ic/arm/handler-compiler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698