Author: [email protected]
Date: Wed Mar 18 05:35:42 2009
New Revision: 1533

Modified:
    branches/bleeding_edge/src/virtual-frame-ia32.cc
    branches/bleeding_edge/src/virtual-frame.cc
    branches/bleeding_edge/src/virtual-frame.h

Log:
Revert r1529, which failed on some of the benchmarks.
Review URL: http://codereview.chromium.org/48128

Modified: branches/bleeding_edge/src/virtual-frame-ia32.cc
==============================================================================
--- branches/bleeding_edge/src/virtual-frame-ia32.cc    (original)
+++ branches/bleeding_edge/src/virtual-frame-ia32.cc    Wed Mar 18 05:35:42  
2009
@@ -550,7 +550,6 @@
      return copy;
    }

-  elements_[index].clear_copied();
    return FrameElement::InvalidElement();
  }

@@ -570,9 +569,7 @@
        // push that register on top of the frame.  If it is copied,
        // make the first copy the backing store and push a fresh copy
        // on top of the frame.
-      FrameElement copy = original.is_copied()
-                          ? AdjustCopies(index)
-                          : FrameElement::InvalidElement();
+      FrameElement copy = AdjustCopies(index);
        if (copy.is_valid()) {
          // The original element was a copy.  Push the copy of the new
          // backing store.
@@ -596,9 +593,7 @@
        // If the element is not copied, push it on top of the frame.
        // If it is copied, make the first copy be the new backing store
        // and push a fresh copy on top of the frame.
-      FrameElement copy = original.is_copied()
-                          ? AdjustCopies(index)
-                          : FrameElement::InvalidElement();
+      FrameElement copy = AdjustCopies(index);
        if (copy.is_valid()) {
          // The original element was a copy.  Push the copy of the new
          // backing store.
@@ -639,8 +634,7 @@
    FrameElement original = elements_[index];
    // If the stored-to slot may be copied, adjust to preserve the
    // copy-on-write semantics of copied elements.
-  if (original.is_copied() &&
-      (original.is_register() || original.is_memory())) {
+  if (original.is_register() || original.is_memory()) {
      FrameElement ignored = AdjustCopies(index);
    }


Modified: branches/bleeding_edge/src/virtual-frame.cc
==============================================================================
--- branches/bleeding_edge/src/virtual-frame.cc (original)
+++ branches/bleeding_edge/src/virtual-frame.cc Wed Mar 18 05:35:42 2009
@@ -93,11 +93,9 @@
      case FrameElement::REGISTER:
        // All copies are backed by memory or register locations.
        result.type_ =
-          FrameElement::TypeField::encode(FrameElement::COPY)
-          | FrameElement::IsCopiedField::encode(false)
-          | FrameElement::SyncField::encode(FrameElement::NOT_SYNCED);
+          FrameElement::TypeField::encode(FrameElement::COPY) |
+          FrameElement::SyncField::encode(FrameElement::NOT_SYNCED);
        result.data_.index_ = index;
-      elements_[index].set_copied();
        break;

      case FrameElement::INVALID:
@@ -369,8 +367,7 @@

    // If the original may be a copy, adjust to preserve the copy-on-write
    // semantics of copied elements.
-  if (original.is_copied() &&
-      (original.is_register() || original.is_memory())) {
+  if (original.is_register() || original.is_memory()) {
      FrameElement ignored = AdjustCopies(frame_index);
    }


Modified: branches/bleeding_edge/src/virtual-frame.h
==============================================================================
--- branches/bleeding_edge/src/virtual-frame.h  (original)
+++ branches/bleeding_edge/src/virtual-frame.h  Wed Mar 18 05:35:42 2009
@@ -101,16 +101,6 @@
    bool is_constant() const { return type() == CONSTANT; }
    bool is_copy() const { return type() == COPY; }

-  bool is_copied() const { return IsCopiedField::decode(type_); }
-
-  void set_copied() {
-    type_ = (type_ & ~IsCopiedField::mask()) | IsCopiedField::encode(true);
-  }
-
-  void clear_copied() {
-    type_ = (type_ & ~IsCopiedField::mask()) |  
IsCopiedField::encode(false);
-  }
-
    Register reg() const {
      ASSERT(is_register());
      return data_.reg_;
@@ -139,8 +129,7 @@

    // BitField is <type, shift, size>.
    class SyncField : public BitField<SyncFlag, 0, 1> {};
-  class IsCopiedField : public BitField<bool, 1, 1> {};
-  class TypeField : public BitField<Type, 2, 32 - 2> {};
+  class TypeField : public BitField<Type, 1, 32 - 1> {};

    Type type() const { return TypeField::decode(type_); }

@@ -155,6 +144,10 @@
      int index_;
    } data_;

+  // The index of the next element in a list of copies, or the frame's
+  // illegal index if there is no next element.
+  int next_;
+
    // Used to construct memory and register elements.
    FrameElement(Type type, Register reg, SyncFlag is_synced) {
      Initialize(type, reg, is_synced);
@@ -182,18 +175,16 @@
  namespace v8 { namespace internal {

  FrameElement::FrameElement(Handle<Object> value, SyncFlag is_synced) {
-  type_ = TypeField::encode(CONSTANT)
-          | IsCopiedField::encode(false)
-          | SyncField::encode(is_synced);
+  type_ = TypeField::encode(CONSTANT) | SyncField::encode(is_synced);
    data_.handle_ = value.location();
+  next_ = VirtualFrame::kIllegalIndex;
  }


  void FrameElement::Initialize(Type type, Register reg, SyncFlag is_synced)  
{
-  type_ = TypeField::encode(type)
-          | IsCopiedField::encode(false)
-          | SyncField::encode(is_synced);
+  type_ = TypeField::encode(type) | SyncField::encode(is_synced);
    data_.reg_ = reg;
+  next_ = VirtualFrame::kIllegalIndex;
  }



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

Reply via email to