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

Unified Diff: src/objects.cc

Issue 10944011: Clear EnumIndices as well on CNLT. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed nit Created 8 years, 3 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 | « src/objects.h ('k') | no next file » | 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 12aeef7d5dc08afc8a4796fabeec4a62dc72297c..db2c1eb75d5cfd40c7c7dfce590c96f4df9b13d0 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -6106,7 +6106,7 @@ void DescriptorArray::SetEnumCache(FixedArray* bridge_storage,
ASSERT(bridge_storage->length() >= kEnumCacheBridgeLength);
ASSERT(new_index_cache->IsSmi() || new_index_cache->IsFixedArray());
if (HasEnumCache()) {
- ASSERT(new_cache->length() > FixedArray::cast(GetEnumCache())->length());
+ ASSERT(new_cache->length() > GetEnumCache()->length());
FixedArray::cast(get(kEnumCacheIndex))->
set(kEnumCacheBridgeCacheIndex, new_cache);
FixedArray::cast(get(kEnumCacheIndex))->
@@ -7521,12 +7521,15 @@ void Map::ClearNonLiveTransitions(Heap* heap) {
if (live_enum == 0) {
descriptors->ClearEnumCache();
} else {
- FixedArray* enum_cache =
- FixedArray::cast(descriptors->GetEnumCache());
+ FixedArray* enum_cache = descriptors->GetEnumCache();
to_trim = enum_cache->length() - live_enum;
if (to_trim > 0) {
RightTrimFixedArray<FROM_GC>(
- heap, FixedArray::cast(descriptors->GetEnumCache()), to_trim);
+ heap, descriptors->GetEnumCache(), to_trim);
+ if (descriptors->HasEnumIndicesCache()) {
+ RightTrimFixedArray<FROM_GC>(
+ heap, descriptors->GetEnumIndicesCache(), to_trim);
+ }
}
}
}
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698