Reviewers: Michael Starzinger,

Message:
PTAL.

Description:
Don't record elements transition slots since it will contain a map.

Additionally removed unused code.


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

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

Affected files:
  M src/mark-compact.h
  M src/mark-compact.cc
  M src/transitions-inl.h
  M src/transitions.h
  M src/transitions.cc


Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index 4bf00aa031eff05a831f8c328c866f0ba5b1b758..62279424cd8bfcbbbbed1dd5fb99b99a720f2a43 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -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: src/mark-compact.h
diff --git a/src/mark-compact.h b/src/mark-compact.h
index c2a70fc385d8eb8069e84eeb8ac9ba3c671d064e..ed3def5c0cbeed4a07f28bd29a27df63298ba83b 100644
--- a/src/mark-compact.h
+++ b/src/mark-compact.h
@@ -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: src/transitions-inl.h
diff --git a/src/transitions-inl.h b/src/transitions-inl.h
index 09284cbddbf50b7728e917953c0cfbcaf1f66be6..24ff8c2af09e9ff23a8bb95f1234616d1aec0f3a 100644
--- a/src/transitions-inl.h
+++ b/src/transitions-inl.h
@@ -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: src/transitions.cc
diff --git a/src/transitions.cc b/src/transitions.cc
index f2e49ecafec3af954a24602e42a85f5f2f1a7707..519f0768686eccd9718f5255e7d86a068cb83dbf 100644
--- a/src/transitions.cc
+++ b/src/transitions.cc
@@ -69,10 +69,9 @@ 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;
+  maybe_array = TransitionArray::Allocate(1);
+  if (!maybe_array->To(&result)) return maybe_array;

   FixedArray::WhitenessWitness witness(result);

Index: src/transitions.h
diff --git a/src/transitions.h b/src/transitions.h
index 7acb88fdaf7f4c1a33dda0b548824a5f45020d10..bc661acf526657ee0483e619d6789be1cf71dc96 100644
--- a/src/transitions.h
+++ b/src/transitions.h
@@ -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();



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

Reply via email to