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

Unified Diff: src/virtual-frame.cc

Issue 40005: Before emitting code to merge frames, forget the sync flag (telling... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/virtual-frame.cc
===================================================================
--- src/virtual-frame.cc (revision 1401)
+++ src/virtual-frame.cc (working copy)
@@ -230,14 +230,19 @@
void VirtualFrame::PrepareMergeTo(VirtualFrame* expected) {
- // No code needs to be generated to invalidate valid elements. No
- // code needs to be generated to move values to memory if they are
- // already synced.
+ // Perform state changes on this frame that will make merge to the
+ // expected frame simpler or else increase the likelihood that his
+ // frame will match another.
for (int i = 0; i < elements_.length(); i++) {
FrameElement source = elements_[i];
FrameElement target = expected->elements_[i];
+
if (!target.is_valid() ||
(target.is_memory() && !source.is_memory() && source.is_synced())) {
+ // No code needs to be generated to invalidate valid elements.
+ // No code needs to be generated to move values to memory if
+ // they are already synced. We perform those moves here, before
+ // merging.
if (source.is_register()) {
// If the frame is the code generator's current frame, we have
// to decrement both the frame-internal and global register
@@ -249,6 +254,12 @@
}
}
elements_[i] = target;
+ } else if (target.is_register() && !source.is_memory()) {
+ // If an element's target is a register, and the element is not
+ // in memory, then the sync state of the element is irrelevant.
+ // We clear the sync bit.
+ ASSERT(source.is_valid());
+ elements_[i].clear_sync();
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698