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

Unified Diff: src/virtual-frame.cc

Issue 20492: Experimental: add a pre-merge step to perform some frame moves that do... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
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 | « src/jump-target-ia32.cc ('k') | src/virtual-frame-arm.h » ('j') | 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 1316)
+++ src/virtual-frame.cc (working copy)
@@ -229,6 +229,31 @@
}
+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.
+ 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())) {
+ 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
+ // counts.
+ if (cgen_->frame() == this) {
+ Unuse(source.reg());
+ } else {
+ frame_registers_.Unuse(source.reg());
+ }
+ }
+ elements_[i] = target;
+ }
+ }
+}
+
+
void VirtualFrame::PrepareForCall(int spilled_args, int dropped_args) {
ASSERT(height() >= dropped_args);
ASSERT(height() >= spilled_args);
« no previous file with comments | « src/jump-target-ia32.cc ('k') | src/virtual-frame-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698