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

Unified Diff: src/hydrogen.cc

Issue 6625057: Fix a stack-height mismatch during deoptimization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 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 | test/mjsunit/regress/regress-1237.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index ff5ce2e2a1daaa7036e5c16d821be784f8715a44..6b7ecdb312dd175bd2aad69e90fce704450cd431 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -302,6 +302,13 @@ void HBasicBlock::Verify() {
// Check that every block is finished.
ASSERT(IsFinished());
ASSERT(block_id() >= 0);
+
+ // Check that the incoming edges are in edge split form.
+ if (predecessors_.length() > 1) {
+ for (int i = 0; i < predecessors_.length(); ++i) {
+ ASSERT(predecessors_[i]->end()->SecondSuccessor() == NULL);
+ }
+ }
}
#endif
@@ -2827,18 +2834,22 @@ void HGraphBuilder::VisitConditional(Conditional* expr) {
cond_true->SetJoinId(expr->ThenId());
cond_false->SetJoinId(expr->ElseId());
- // TOOD(kmillikin): Visit the subexpressions in the same AST context as
- // the whole expression.
+ // Visit the true and false subexpressions in the same AST context as the
+ // whole expression.
set_current_block(cond_true);
- VISIT_FOR_VALUE(expr->then_expression());
+ Visit(expr->then_expression());
+ CHECK_BAILOUT;
HBasicBlock* other = current_block();
set_current_block(cond_false);
- VISIT_FOR_VALUE(expr->else_expression());
+ Visit(expr->else_expression());
+ CHECK_BAILOUT;
- HBasicBlock* join = CreateJoin(other, current_block(), expr->id());
- set_current_block(join);
- ast_context()->ReturnValue(Pop());
+ if (!ast_context()->IsTest()) {
+ HBasicBlock* join = CreateJoin(other, current_block(), expr->id());
+ set_current_block(join);
+ if (!ast_context()->IsEffect()) ast_context()->ReturnValue(Pop());
+ }
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-1237.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698