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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 981243002: [turbofan] Introduce JSStackCheck operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 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 | « src/compiler/ast-graph-builder.h ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « src/compiler/ast-graph-builder.h ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698