Author: [email protected]
Date: Mon Dec 15 07:59:00 2008
New Revision: 981

Modified:
    branches/experimental/toiger/src/virtual-frame-ia32.cc

Log:
Experimental: fix a pair of bugs in the frame's sync state.  In two
cases we could erroneously mark elements as synced, causing them to be
lost if we hit a spill.

Review URL: http://codereview.chromium.org/14105

Modified: branches/experimental/toiger/src/virtual-frame-ia32.cc
==============================================================================
--- branches/experimental/toiger/src/virtual-frame-ia32.cc      (original)
+++ branches/experimental/toiger/src/virtual-frame-ia32.cc      Mon Dec 15  
07:59:00 2008
@@ -498,6 +498,12 @@
        } else {
          // Source is constant.
          __ Set(target.reg(), Immediate(source.handle()));
+        if (target.is_synced()) {
+          if (i > stack_pointer_) {
+            SyncRange(stack_pointer_ + 1, i);
+          }
+          SyncElementAt(i);
+        }
        }
        Use(target.reg());
        elements_[i] = target;
@@ -708,12 +714,13 @@

      cgen_->allocator()->Unuse(temp);
    } else {
-    // For constants and registers, add a copy of the element to the
-    // top of the frame.
+    // For constants and registers, add an (unsynced) copy of the element  
to
+    // the top of the frame.
      ASSERT(element.is_register() || element.is_constant());
      if (element.is_register()) {
        Use(element.reg());
      }
+    element.clear_sync();
      elements_.Add(element);
    }
  }

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

Reply via email to