Reviewers: Jakob,
Message:
PTAL.
Description:
Invalidate the enum cache when converting a transition across which the
descriptors are shared.
Please review this at https://chromiumcodereview.appspot.com/11145017/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/objects.cc
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index
10c10ea0e411b7a337782a7bbc6912e9613fa00d..7dcefa2da6c4643ccdda8f8ce4ec76b27d33fb21
100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -1806,9 +1806,6 @@ MaybeObject*
JSObject::ConvertTransitionToMapTransition(
Map* map;
DescriptorArray* new_descriptors = new_map->instance_descriptors();
DescriptorArray* old_descriptors = old_map->instance_descriptors();
- if (old_descriptors->HasEnumCache()) {
- new_descriptors->CopyEnumCacheFrom(old_descriptors);
- }
for (Object* current = old_map;
!current->IsUndefined();
current = map->GetBackPointer()) {
@@ -1816,6 +1813,7 @@ MaybeObject*
JSObject::ConvertTransitionToMapTransition(
if (!map->HasTransitionArray()) break;
TransitionArray* transitions = map->transitions();
if (transitions->descriptors() != old_descriptors) break;
+ map->SetEnumLength(Map::kInvalidEnumCache);
transitions->set_descriptors(new_descriptors);
}
old_map->set_owns_descriptors(false);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev