Reviewers: Jakob,

Message:
PTAL.

Description:
Remove LastAdded from the EnumCacheBridge.


Please review this at https://chromiumcodereview.appspot.com/10806030/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/objects.h
  M src/objects.cc


Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index d12eceda219fd3cbf91b1d4d13ee337b521a326e..39419542ac15f44f404553847ef63a3484b15476 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -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);
   }
 }
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 788b03b5ddffc627e5afa202861ecaac37f06403..d2c802386f3025e37c92bce0c3e85d901bc0490b 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -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;


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to