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

Side by Side Diff: src/hydrogen.cc

Issue 285333002: Omit stack check in non-looping loops. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "hydrogen.h" 5 #include "hydrogen.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "v8.h" 9 #include "v8.h"
10 #include "allocation-site-scopes.h" 10 #include "allocation-site-scopes.h"
(...skipping 4594 matching lines...) Expand 10 before | Expand all | Expand 10 after
4605 4605
4606 BreakAndContinueInfo break_info(stmt); 4606 BreakAndContinueInfo break_info(stmt);
4607 CHECK_BAILOUT(VisitLoopBody(stmt, loop_entry, &break_info)); 4607 CHECK_BAILOUT(VisitLoopBody(stmt, loop_entry, &break_info));
4608 HBasicBlock* body_exit = 4608 HBasicBlock* body_exit =
4609 JoinContinue(stmt, current_block(), break_info.continue_block()); 4609 JoinContinue(stmt, current_block(), break_info.continue_block());
4610 HBasicBlock* loop_successor = NULL; 4610 HBasicBlock* loop_successor = NULL;
4611 if (body_exit != NULL && !stmt->cond()->ToBooleanIsTrue()) { 4611 if (body_exit != NULL && !stmt->cond()->ToBooleanIsTrue()) {
4612 set_current_block(body_exit); 4612 set_current_block(body_exit);
4613 loop_successor = graph()->CreateBasicBlock(); 4613 loop_successor = graph()->CreateBasicBlock();
4614 if (stmt->cond()->ToBooleanIsFalse()) { 4614 if (stmt->cond()->ToBooleanIsFalse()) {
4615 loop_entry->loop_information()->stack_check()->Eliminate();
4615 Goto(loop_successor); 4616 Goto(loop_successor);
4616 body_exit = NULL; 4617 body_exit = NULL;
4617 } else { 4618 } else {
4618 // The block for a true condition, the actual predecessor block of the 4619 // The block for a true condition, the actual predecessor block of the
4619 // back edge. 4620 // back edge.
4620 body_exit = graph()->CreateBasicBlock(); 4621 body_exit = graph()->CreateBasicBlock();
4621 CHECK_BAILOUT(VisitForControl(stmt->cond(), body_exit, loop_successor)); 4622 CHECK_BAILOUT(VisitForControl(stmt->cond(), body_exit, loop_successor));
4622 } 4623 }
4623 if (body_exit != NULL && body_exit->HasPredecessor()) { 4624 if (body_exit != NULL && body_exit->HasPredecessor()) {
4624 body_exit->SetJoinId(stmt->BackEdgeId()); 4625 body_exit->SetJoinId(stmt->BackEdgeId());
(...skipping 7176 matching lines...) Expand 10 before | Expand all | Expand 10 after
11801 if (ShouldProduceTraceOutput()) { 11802 if (ShouldProduceTraceOutput()) {
11802 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11803 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11803 } 11804 }
11804 11805
11805 #ifdef DEBUG 11806 #ifdef DEBUG
11806 graph_->Verify(false); // No full verify. 11807 graph_->Verify(false); // No full verify.
11807 #endif 11808 #endif
11808 } 11809 }
11809 11810
11810 } } // namespace v8::internal 11811 } } // namespace v8::internal
OLDNEW
« 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