From: verwaest@chromium.org Date: Fri, 12 Oct 2012 08:16:49 +0000 (+0000) Subject: Make EnumCacheBridge immutable. X-Git-Tag: upstream/4.7.83~15866 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ecabf526cd30ef60cb0889e1c90a4c2bbae0a1c;p=platform%2Fupstream%2Fv8.git Make EnumCacheBridge immutable. Review URL: https://chromiumcodereview.appspot.com/11048051 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/objects.cc b/src/objects.cc index aa59047..42152d5 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -6098,20 +6098,13 @@ void DescriptorArray::SetEnumCache(FixedArray* bridge_storage, Object* new_index_cache) { ASSERT(bridge_storage->length() >= kEnumCacheBridgeLength); ASSERT(new_index_cache->IsSmi() || new_index_cache->IsFixedArray()); - if (HasEnumCache()) { - ASSERT(new_cache->length() > GetEnumCache()->length()); - FixedArray::cast(get(kEnumCacheIndex))-> - set(kEnumCacheBridgeCacheIndex, new_cache); - FixedArray::cast(get(kEnumCacheIndex))-> - set(kEnumCacheBridgeIndicesCacheIndex, new_index_cache); - } else { - ASSERT(!IsEmpty()); - FixedArray::cast(bridge_storage)-> - set(kEnumCacheBridgeCacheIndex, new_cache); - FixedArray::cast(bridge_storage)-> - set(kEnumCacheBridgeIndicesCacheIndex, new_index_cache); - set(kEnumCacheIndex, bridge_storage); - } + ASSERT(!IsEmpty()); + ASSERT(!HasEnumCache() || new_cache->length() > GetEnumCache()->length()); + FixedArray::cast(bridge_storage)-> + set(kEnumCacheBridgeCacheIndex, new_cache); + FixedArray::cast(bridge_storage)-> + set(kEnumCacheBridgeIndicesCacheIndex, new_index_cache); + set(kEnumCacheIndex, bridge_storage); }