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

Unified Diff: src/hydrogen.cc

Issue 7212025: Add support for lazy deoptimization from deferred stack checks (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 338c12e02ce5e2f5a432bde34dbd006d428fe037..887ba7360282c7f2d39904ff150b240c4a5001af 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -2789,17 +2789,18 @@ void HGraphBuilder::PreProcessOsrEntry(IterationStatement* statement) {
}
-void HGraphBuilder::VisitLoopBody(Statement* body,
+void HGraphBuilder::VisitLoopBody(IterationStatement* stmt,
HBasicBlock* loop_entry,
BreakAndContinueInfo* break_info) {
BreakAndContinueScope push(break_info, this);
+ AddSimulate(stmt->StackCheckId());
HValue* context = environment()->LookupContext();
HStackCheck* stack_check =
new(zone()) HStackCheck(context, HStackCheck::kBackwardsBranch);
AddInstruction(stack_check);
ASSERT(loop_entry->IsLoopHeader());
loop_entry->loop_information()->set_stack_check(stack_check);
- CHECK_BAILOUT(Visit(body));
+ CHECK_BAILOUT(Visit(stmt->body()));
}
@@ -2814,7 +2815,7 @@ void HGraphBuilder::VisitDoWhileStatement(DoWhileStatement* stmt) {
set_current_block(loop_entry);
BreakAndContinueInfo break_info(stmt);
- CHECK_BAILOUT(VisitLoopBody(stmt->body(), loop_entry, &break_info));
+ CHECK_BAILOUT(VisitLoopBody(stmt, loop_entry, &break_info));
HBasicBlock* body_exit =
JoinContinue(stmt, current_block(), break_info.continue_block());
HBasicBlock* loop_successor = NULL;
@@ -2875,7 +2876,7 @@ void HGraphBuilder::VisitWhileStatement(WhileStatement* stmt) {
BreakAndContinueInfo break_info(stmt);
if (current_block() != NULL) {
BreakAndContinueScope push(&break_info, this);
- CHECK_BAILOUT(VisitLoopBody(stmt->body(), loop_entry, &break_info));
+ CHECK_BAILOUT(VisitLoopBody(stmt, loop_entry, &break_info));
}
HBasicBlock* body_exit =
JoinContinue(stmt, current_block(), break_info.continue_block());
@@ -2920,7 +2921,7 @@ void HGraphBuilder::VisitForStatement(ForStatement* stmt) {
BreakAndContinueInfo break_info(stmt);
if (current_block() != NULL) {
BreakAndContinueScope push(&break_info, this);
- CHECK_BAILOUT(VisitLoopBody(stmt->body(), loop_entry, &break_info));
+ CHECK_BAILOUT(VisitLoopBody(stmt, loop_entry, &break_info));
}
HBasicBlock* body_exit =
JoinContinue(stmt, current_block(), break_info.continue_block());

Powered by Google App Engine
This is Rietveld 408576698