Don't record elements transition slots since it will contain a map.
authorverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 20 Jul 2012 07:24:50 +0000 (07:24 +0000)
committerverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 20 Jul 2012 07:24:50 +0000 (07:24 +0000)
Additionally removed unused code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/mark-compact.cc
src/mark-compact.h
src/transitions-inl.h
src/transitions.cc
src/transitions.h

index b3cc4edf0fe3c6a0645ce458b1e6daadf2fe010a..b842a34b646b1d678dd9706bc7f88f564278ef28 100644 (file)
@@ -1974,13 +1974,6 @@ void Marker<T>::MarkTransitionArray(TransitionArray* transitions) {
   if (!base_marker()->MarkObjectWithoutPush(transitions)) return;
   Object** transitions_start = transitions->data_start();
 
-  if (transitions->HasElementsTransition()) {
-    mark_compact_collector()->RecordSlot(
-        transitions_start,
-        transitions->GetElementsTransitionSlot(),
-        transitions->elements_transition());
-  }
-
   if (transitions->HasPrototypeTransitions()) {
     // Mark prototype transitions array but don't push it into marking stack.
     // This will make references from it weak. We will clean dead prototype
@@ -2003,16 +1996,6 @@ void Marker<T>::MarkTransitionArray(TransitionArray* transitions) {
 }
 
 
-template <class T>
-void Marker<T>::MarkAccessorPairSlot(AccessorPair* accessors, int offset) {
-  Object** slot = HeapObject::RawField(accessors, offset);
-  HeapObject* accessor = HeapObject::cast(*slot);
-  if (accessor->IsMap()) return;
-  mark_compact_collector()->RecordSlot(slot, slot, accessor);
-  base_marker()->MarkObjectAndPush(accessor);
-}
-
-
 // Fill the marking stack with overflowed objects returned by the given
 // iterator.  Stop when the marking stack is filled or the end of the space
 // is reached, whichever comes first.
index c2a70fc385d8eb8069e84eeb8ac9ba3c671d064e..ed3def5c0cbeed4a07f28bd29a27df63298ba83b 100644 (file)
@@ -396,7 +396,6 @@ template<class BaseMarker> class Marker {
   void MarkMapContents(Map* map);
   void MarkDescriptorArray(DescriptorArray* descriptors);
   void MarkTransitionArray(TransitionArray* transitions);
-  void MarkAccessorPairSlot(AccessorPair* accessors, int offset);
 
  private:
   BaseMarker* base_marker() {
index 09284cbddbf50b7728e917953c0cfbcaf1f66be6..24ff8c2af09e9ff23a8bb95f1234616d1aec0f3a 100644 (file)
@@ -167,12 +167,6 @@ PropertyDetails TransitionArray::GetTargetDetails(int transition_number) {
 }
 
 
-Object** TransitionArray::GetElementsTransitionSlot() {
-  return HeapObject::RawField(reinterpret_cast<HeapObject*>(this),
-                              kElementsTransitionOffset);
-}
-
-
 int TransitionArray::Search(String* name) {
   return internal::Search(this, name);
 }
index f2e49ecafec3af954a24602e42a85f5f2f1a7707..5dda18eddf8559a09ae7aa8e1cef5a8d1204720a 100644 (file)
@@ -69,10 +69,8 @@ static bool InsertionPointFound(String* key1, String* key2) {
 MaybeObject* TransitionArray::NewWith(String* name, Map* target) {
   TransitionArray* result;
 
-  { MaybeObject* maybe_array;
-    maybe_array = TransitionArray::Allocate(1);
-    if (!maybe_array->To(&result)) return maybe_array;
-  }
+  MaybeObject* maybe_array = TransitionArray::Allocate(1);
+  if (!maybe_array->To(&result)) return maybe_array;
 
   FixedArray::WhitenessWitness witness(result);
 
index 7acb88fdaf7f4c1a33dda0b548824a5f45020d10..bc661acf526657ee0483e619d6789be1cf71dc96 100644 (file)
@@ -61,7 +61,6 @@ class TransitionArray: public FixedArray {
   inline void set_elements_transition(
       Map* target,
       WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
-  inline Object** GetElementsTransitionSlot();
   inline bool HasElementsTransition();
   inline void ClearElementsTransition();