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

Unified Diff: src/jump-target-arm.cc

Issue 11011: The expected expression stack height at the return label can be... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 12 years, 1 month 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/codegen-arm.cc ('k') | src/jump-target-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/jump-target-arm.cc
===================================================================
--- src/jump-target-arm.cc (revision 751)
+++ src/jump-target-arm.cc (working copy)
@@ -70,8 +70,16 @@
if (expected_frame_ == NULL) {
expected_frame_ = current_frame;
code_generator_->set_frame(NULL);
+ // The frame at the actual function return will always have height zero.
+ if (code_generator_->IsActualFunctionReturn(this)) {
+ expected_frame_->Forget(expected_frame_->height());
+ }
} else {
- current_frame->MergeTo(expected_frame_);
+ // No code needs to be emitted to merge to the expected frame at the
+ // actual function return.
+ if (!code_generator_->IsActualFunctionReturn(this)) {
+ current_frame->MergeTo(expected_frame_);
+ }
code_generator_->delete_frame();
}
@@ -92,8 +100,16 @@
if (expected_frame_ == NULL) {
expected_frame_ = new VirtualFrame(current_frame);
+ // The frame at the actual function return will always have height zero.
+ if (code_generator_->IsActualFunctionReturn(this)) {
+ expected_frame_->Forget(expected_frame_->height());
+ }
} else {
- current_frame->MergeTo(expected_frame_);
+ // No code needs to be emitted to merge to the expected frame at the
+ // actual function return.
+ if (!code_generator_->IsActualFunctionReturn(this)) {
+ current_frame->MergeTo(expected_frame_);
+ }
}
__ b(cc, &label_);
@@ -107,6 +123,7 @@
// at the label.
ASSERT(code_generator_ != NULL);
ASSERT(masm_ != NULL);
+ ASSERT(!code_generator_->IsActualFunctionReturn(this));
VirtualFrame* current_frame = code_generator_->frame();
ASSERT(current_frame != NULL);
@@ -136,10 +153,18 @@
if (expected_frame_ == NULL) {
expected_frame_ = new VirtualFrame(current_frame);
+ // The frame at the actual function return will always have height zero.
+ if (code_generator_->IsActualFunctionReturn(this)) {
+ expected_frame_->Forget(expected_frame_->height());
+ }
} else if (current_frame == NULL) {
code_generator_->set_frame(new VirtualFrame(expected_frame_));
} else {
- current_frame->MergeTo(expected_frame_);
+ // No code needs to be emitted to merge to the expected frame at the
+ // actual function return.
+ if (!code_generator_->IsActualFunctionReturn(this)) {
+ current_frame->MergeTo(expected_frame_);
+ }
}
__ bind(&label_);
« no previous file with comments | « src/codegen-arm.cc ('k') | src/jump-target-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698