Remove LastAdded from the EnumCacheBridge.

Review URL: https://chromiumcodereview.appspot.com/10806030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
verwaest@chromium.org 2012-07-19 14:59:30 +00:00
parent 52bfb2a18e
commit 5b0d3a09eb
2 changed files with 5 additions and 11 deletions

View File

@ -5728,7 +5728,7 @@ MaybeObject* DescriptorArray::Allocate(int number_of_descriptors,
if (!maybe_array->To(&result)) return maybe_array;
}
result->set(kEnumCacheIndex, Smi::FromInt(Map::kNoneAdded));
result->set(kEnumCacheIndex, Smi::FromInt(0));
result->set(kTransitionsIndex, Smi::FromInt(0));
return result;
}
@ -5750,9 +5750,6 @@ void DescriptorArray::SetEnumCache(FixedArray* bridge_storage,
set(kEnumCacheBridgeCacheIndex, new_cache);
FixedArray::cast(bridge_storage)->
set(kEnumCacheBridgeIndicesCacheIndex, new_index_cache);
NoWriteBarrierSet(FixedArray::cast(bridge_storage),
kEnumCacheBridgeLastAdded,
get(kEnumCacheIndex));
set(kEnumCacheIndex, bridge_storage);
}
}

View File

@ -2573,10 +2573,9 @@ class DescriptorArray: public FixedArray {
static const int kFirstIndex = 3;
// The length of the "bridge" to the enum cache.
static const int kEnumCacheBridgeLength = 3;
static const int kEnumCacheBridgeLastAdded = 0;
static const int kEnumCacheBridgeCacheIndex = 1;
static const int kEnumCacheBridgeIndicesCacheIndex = 2;
static const int kEnumCacheBridgeLength = 2;
static const int kEnumCacheBridgeCacheIndex = 0;
static const int kEnumCacheBridgeIndicesCacheIndex = 1;
// Layout description.
static const int kBackPointerStorageOffset = FixedArray::kHeaderSize;
@ -2586,9 +2585,7 @@ class DescriptorArray: public FixedArray {
static const int kFirstOffset = kTransitionsOffset + kPointerSize;
// Layout description for the bridge array.
static const int kEnumCacheBridgeLastAddedOffset = FixedArray::kHeaderSize;
static const int kEnumCacheBridgeCacheOffset =
kEnumCacheBridgeLastAddedOffset + kPointerSize;
static const int kEnumCacheBridgeCacheOffset = FixedArray::kHeaderSize;
// Layout of descriptor.
static const int kDescriptorKey = 0;