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

Unified Diff: src/hydrogen.cc

Issue 246963003: Make sure to clear any previously collected field maps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698