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

Unified Diff: src/objects.cc

Issue 1200003002: Map::ReconfigureProperty() should mark map as unstable when it returns a different map. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Spurious changes in comments fixed Created 5 years, 6 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/objects-printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index f2d617b8298e93d45d9dfb580f8549a7bfbfb0fa..5604516a066d1b4514d16ea04ae618ea0185e4b2 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -2565,6 +2565,9 @@ Handle<Map> Map::ReconfigureProperty(Handle<Map> old_map, int modify_index,
target_descriptors->GetFieldType(modify_index)));
}
#endif
+ if (*target_map != *old_map) {
+ old_map->NotifyLeafMapLayoutChange();
+ }
return target_map;
}
@@ -2818,13 +2821,6 @@ Handle<Map> Map::ReconfigureProperty(Handle<Map> old_map, int modify_index,
split_kind, old_descriptors->GetKey(split_nof), split_attributes,
*new_descriptors, *new_layout_descriptor);
- if (from_kind != to_kind) {
- // There was an elements kind change in the middle of transition tree and
- // we reconstructed the tree so that all elements kind transitions are
- // done at the beginning, therefore the |old_map| is no longer stable.
- old_map->NotifyLeafMapLayoutChange();
- }
-
// If |transition_target_deprecated| is true then the transition array
// already contains entry for given descriptor. This means that the transition
// could be inserted regardless of whether transitions array is full or not.
@@ -2835,6 +2831,8 @@ Handle<Map> Map::ReconfigureProperty(Handle<Map> old_map, int modify_index,
"GenAll_CantHaveMoreTransitions");
}
+ old_map->NotifyLeafMapLayoutChange();
+
if (FLAG_trace_generalization && modify_index >= 0) {
PropertyDetails old_details = old_descriptors->GetDetails(modify_index);
PropertyDetails new_details = new_descriptors->GetDetails(modify_index);
« no previous file with comments | « no previous file | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698