Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Unified Diff: src/virtual-frame-ia32.cc

Issue 50005: Add a copied flag to virtual frame elements that tells if a copy has... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/virtual-frame.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/virtual-frame-ia32.cc
===================================================================
--- src/virtual-frame-ia32.cc (revision 1542)
+++ src/virtual-frame-ia32.cc (working copy)
@@ -171,11 +171,10 @@
MergeMoveRegistersToRegisters(expected);
MergeMoveMemoryToRegisters(expected);
- // Fix any sync bit problems from the bottom-up, stopping when we
- // hit the stack pointer or the top of the frame if the stack
- // pointer is floating above the frame.
- int limit = Min(stack_pointer_, elements_.length() - 1);
- for (int i = 0; i <= limit; i++) {
+ // Fix any sync flag problems from the bottom-up and make the copied
+ // flags exact. This assumes that the backing store of copies is
+ // always lower in the frame.
+ for (int i = 0; i < elements_.length(); i++) {
FrameElement source = elements_[i];
FrameElement target = expected->elements_[i];
if (source.is_synced() && !target.is_synced()) {
@@ -183,6 +182,10 @@
} else if (!source.is_synced() && target.is_synced()) {
SyncElementAt(i);
}
+ elements_[i].clear_copied();
+ if (elements_[i].is_copy()) {
+ elements_[elements_[i].index()].set_copied();
+ }
}
// Adjust the stack point downard if necessary.
@@ -550,6 +553,7 @@
return copy;
}
+ elements_[index].clear_copied();
return FrameElement::InvalidElement();
}
@@ -569,7 +573,9 @@
// 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 = AdjustCopies(index);
+ FrameElement copy = original.is_copied()
+ ? AdjustCopies(index)
+ : FrameElement::InvalidElement();
if (copy.is_valid()) {
// The original element was a copy. Push the copy of the new
// backing store.
@@ -593,7 +599,9 @@
// 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 = AdjustCopies(index);
+ FrameElement copy = original.is_copied()
+ ? AdjustCopies(index)
+ : FrameElement::InvalidElement();
if (copy.is_valid()) {
// The original element was a copy. Push the copy of the new
// backing store.
@@ -634,7 +642,8 @@
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_register() || original.is_memory()) {
+ if (original.is_copied() &&
+ (original.is_register() || original.is_memory())) {
FrameElement ignored = AdjustCopies(index);
}
« no previous file with comments | « src/virtual-frame.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698