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

Unified Diff: src/virtual-frame.cc

Issue 42324: Add a bit to a virtual frame element telling if it's been copied. Set... (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
Index: src/virtual-frame.cc
===================================================================
--- src/virtual-frame.cc (revision 1527)
+++ src/virtual-frame.cc (working copy)
@@ -93,9 +93,11 @@
case FrameElement::REGISTER:
// All copies are backed by memory or register locations.
result.type_ =
- FrameElement::TypeField::encode(FrameElement::COPY) |
- FrameElement::SyncField::encode(FrameElement::NOT_SYNCED);
+ FrameElement::TypeField::encode(FrameElement::COPY)
+ | FrameElement::IsCopiedField::encode(false)
+ | FrameElement::SyncField::encode(FrameElement::NOT_SYNCED);
result.data_.index_ = index;
+ elements_[index].set_copied();
break;
case FrameElement::INVALID:
@@ -367,7 +369,8 @@
// If the original may be a copy, 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(frame_index);
}
« src/virtual-frame.h ('K') | « src/virtual-frame.h ('k') | src/virtual-frame-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698