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

Unified Diff: src/codegen-ia32.cc

Issue 17231: Small change to uses of reference: adds two more frame spills after reference... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 11 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/codegen-ia32.cc
===================================================================
--- src/codegen-ia32.cc (revision 1034)
+++ src/codegen-ia32.cc (working copy)
@@ -2288,6 +2288,8 @@
// Remove the exception from the stack.
frame_->Drop();
+ // Dropping a reference can leave the stack in an unspilled state.
+ frame_->SpillAll();
VisitStatementsAndSpill(node->catch_block()->statements());
if (has_valid_frame()) {
@@ -3076,7 +3078,7 @@
var->mode() == Variable::CONST &&
node->op() != Token::INIT_VAR && node->op() != Token::INIT_CONST) {
// Assignment ignored - leave the value on the stack.
- } else {
+ } else {
CodeForSourcePosition(node->position());
if (node->op() == Token::INIT_CONST) {
// Dynamic constant initializations must use the function context
@@ -3227,6 +3229,9 @@
// Call the function.
CallWithArguments(args, node->position());
}
+ // Needed because of the Reference destructor in the else case.
+ // Does nothing in the then case.
+ frame_->SpillAll();
} else {
// ----------------------------------
« 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