Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index f3bd68f643937a1b858c65870fdc4bac4fe1c1d3..90968373a51e16b68b1b12b4740665ff9c297e2c 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -5574,15 +5574,15 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LoadResult(Handle<Map> map) { |
void HOptimizedGraphBuilder::PropertyAccessInfo::LoadFieldMaps( |
Handle<Map> map) { |
+ // Clear any previously collected field maps. |
+ field_maps_.Clear(); |
+ |
// Figure out the field type from the accessor map. |
Handle<HeapType> field_type(lookup_.GetFieldTypeFromMap(*map), isolate()); |
// Collect the (stable) maps from the field type. |
int num_field_maps = field_type->NumClasses(); |
- if (num_field_maps == 0) { |
- field_maps_.Clear(); |
- return; |
- } |
+ if (num_field_maps == 0) return; |
ASSERT(access_.representation().IsHeapObject()); |
field_maps_.Reserve(num_field_maps, zone()); |
HeapType::Iterator<Map> it = field_type->Classes(); |