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

Unified Diff: src/codegen-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.h ('k') | src/jump-target-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-arm.cc
===================================================================
--- src/codegen-arm.cc (revision 751)
+++ src/codegen-arm.cc (working copy)
@@ -82,7 +82,8 @@
frame_(NULL),
cc_reg_(al),
state_(NULL),
- break_stack_height_(0) {
+ break_stack_height_(0),
+ function_return_is_shadowed_(false) {
}
@@ -103,6 +104,7 @@
set_frame(new VirtualFrame(this));
cc_reg_ = al;
function_return_.set_code_generator(this);
+ function_return_is_shadowed_ = false;
{
CodeGenState state(this);
@@ -267,6 +269,8 @@
}
// Code generation state must be reset.
+ ASSERT(!function_return_is_shadowed_);
+ function_return_.Unuse();
scope_ = NULL;
frame_ = NULL;
ASSERT(!has_cc());
@@ -1819,6 +1823,8 @@
for (int i = 0; i < nof_escapes; i++) {
shadows.Add(new ShadowTarget(node->escaping_targets()->at(i)));
}
+ bool function_return_was_shadowed = function_return_is_shadowed_;
+ function_return_is_shadowed_ = true;
// Generate code for the statements in the try block.
VisitStatements(node->try_block()->statements());
@@ -1834,6 +1840,7 @@
shadows[i]->StopShadowing();
if (shadows[i]->is_linked()) nof_unlinks++;
}
+ function_return_is_shadowed_ = function_return_was_shadowed;
const int kNextIndex = (StackHandlerConstants::kNextOffset
+ StackHandlerConstants::kAddressDisplacement)
@@ -1916,6 +1923,8 @@
for (int i = 0; i < nof_escapes; i++) {
shadows.Add(new ShadowTarget(node->escaping_targets()->at(i)));
}
+ bool function_return_was_shadowed = function_return_is_shadowed_;
+ function_return_is_shadowed_ = true;
// Generate code for the statements in the try block.
VisitStatements(node->try_block()->statements());
@@ -1928,6 +1937,7 @@
shadows[i]->StopShadowing();
if (shadows[i]->is_linked()) nof_unlinks++;
}
+ function_return_is_shadowed_ = function_return_was_shadowed;
// If we can fall off the end of the try block, set the state on the stack
// to FALLING.
@@ -3324,6 +3334,11 @@
}
+bool CodeGenerator::IsActualFunctionReturn(JumpTarget* target) {
+ return (target == &function_return_ && !function_return_is_shadowed_);
+}
+
+
#undef __
#define __ masm->
« no previous file with comments | « src/codegen-arm.h ('k') | src/jump-target-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698