Index: src/compiler/ast-graph-builder.cc |
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc |
index e87ca786b19775e1dac0d88e370b1ac7d75bb6f1..80d7e046cb7db3496154d9ae810f7cd97446ff6b 100644 |
--- a/src/compiler/ast-graph-builder.cc |
+++ b/src/compiler/ast-graph-builder.cc |
@@ -508,7 +508,7 @@ void AstGraphBuilder::CreateGraphBody() { |
VisitDeclarations(scope->declarations()); |
// Build a stack-check before the body. |
- Node* node = BuildStackCheck(); |
+ Node* node = NewNode(javascript()->StackCheck()); |
PrepareFrameState(node, BailoutId::FunctionEntry()); |
// Visit statements in the function body. |
@@ -2965,21 +2965,6 @@ Node* AstGraphBuilder::BuildBinaryOp(Node* left, Node* right, Token::Value op) { |
} |
-Node* AstGraphBuilder::BuildStackCheck() { |
- IfBuilder stack_check(this); |
- Node* limit = BuildLoadExternal( |
- ExternalReference::address_of_stack_limit(isolate()), kMachPtr); |
- Node* stack = NewNode(jsgraph()->machine()->LoadStackPointer()); |
- Node* tag = NewNode(jsgraph()->machine()->UintLessThan(), limit, stack); |
- stack_check.If(tag, BranchHint::kTrue); |
- stack_check.Then(); |
- stack_check.Else(); |
- Node* guard = NewNode(javascript()->CallRuntime(Runtime::kStackGuard, 0)); |
- stack_check.End(); |
- return guard; |
-} |
- |
- |
bool AstGraphBuilder::CheckOsrEntry(IterationStatement* stmt) { |
if (info()->osr_ast_id() == stmt->OsrEntryId()) { |
info()->set_osr_expr_stack_height(std::max( |