Commit f276c8d9 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

[turbofan] Turn slow case for stack check into deferred code.

R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/687473002

Cr-Commit-Position: refs/heads/master@{#24918}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24918 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1e96221b
...@@ -2113,7 +2113,7 @@ Node* AstGraphBuilder::BuildStackCheck() { ...@@ -2113,7 +2113,7 @@ Node* AstGraphBuilder::BuildStackCheck() {
jsgraph()->ZeroConstant()); jsgraph()->ZeroConstant());
Node* stack = NewNode(jsgraph()->machine()->LoadStackPointer()); Node* stack = NewNode(jsgraph()->machine()->LoadStackPointer());
Node* tag = NewNode(jsgraph()->machine()->UintLessThan(), limit, stack); Node* tag = NewNode(jsgraph()->machine()->UintLessThan(), limit, stack);
stack_check.If(tag); stack_check.If(tag, BranchHint::kTrue);
stack_check.Then(); stack_check.Then();
stack_check.Else(); stack_check.Else();
Node* guard = NewNode(javascript()->CallRuntime(Runtime::kStackGuard, 0)); Node* guard = NewNode(javascript()->CallRuntime(Runtime::kStackGuard, 0));
......
...@@ -9,8 +9,8 @@ namespace internal { ...@@ -9,8 +9,8 @@ namespace internal {
namespace compiler { namespace compiler {
void IfBuilder::If(Node* condition) { void IfBuilder::If(Node* condition, BranchHint hint) {
builder_->NewBranch(condition); builder_->NewBranch(condition, hint);
else_environment_ = environment()->CopyForConditional(); else_environment_ = environment()->CopyForConditional();
} }
......
...@@ -14,7 +14,6 @@ namespace v8 { ...@@ -14,7 +14,6 @@ namespace v8 {
namespace internal { namespace internal {
namespace compiler { namespace compiler {
// Base class for all control builders. Also provides a common interface for // Base class for all control builders. Also provides a common interface for
// control builders to handle 'break' and 'continue' statements when they are // control builders to handle 'break' and 'continue' statements when they are
// used to model breakable statements. // used to model breakable statements.
...@@ -49,7 +48,7 @@ class IfBuilder : public ControlBuilder { ...@@ -49,7 +48,7 @@ class IfBuilder : public ControlBuilder {
else_environment_(NULL) {} else_environment_(NULL) {}
// Primitive control commands. // Primitive control commands.
void If(Node* condition); void If(Node* condition, BranchHint hint = BranchHint::kNone);
void Then(); void Then();
void Else(); void Else();
void End(); void End();
......
...@@ -99,8 +99,8 @@ class StructuredGraphBuilder : public GraphBuilder { ...@@ -99,8 +99,8 @@ class StructuredGraphBuilder : public GraphBuilder {
Node* NewIfFalse() { return NewNode(common()->IfFalse()); } Node* NewIfFalse() { return NewNode(common()->IfFalse()); }
Node* NewMerge() { return NewNode(common()->Merge(1), true); } Node* NewMerge() { return NewNode(common()->Merge(1), true); }
Node* NewLoop() { return NewNode(common()->Loop(1), true); } Node* NewLoop() { return NewNode(common()->Loop(1), true); }
Node* NewBranch(Node* condition) { Node* NewBranch(Node* condition, BranchHint hint = BranchHint::kNone) {
return NewNode(common()->Branch(), condition); return NewNode(common()->Branch(hint), condition);
} }
protected: protected:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment