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

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

Issue 994433002: [turbofan] Skip function entry stack check for inlinee. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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-inlining.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 80d7e046cb7db3496154d9ae810f7cd97446ff6b..d8008ac44a0f370815efc19d570aa464f3fc675c 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -430,7 +430,7 @@ Node* AstGraphBuilder::NewCurrentContextOsrValue() {
}
-bool AstGraphBuilder::CreateGraph(bool constant_context) {
+bool AstGraphBuilder::CreateGraph(bool constant_context, bool stack_check) {
Scope* scope = info()->scope();
DCHECK(graph() != NULL);
@@ -469,10 +469,10 @@ bool AstGraphBuilder::CreateGraph(bool constant_context) {
Node* inner_context =
BuildLocalFunctionContext(function_context_.get(), closure);
ContextScope top_context(this, scope, inner_context);
- CreateGraphBody();
+ CreateGraphBody(stack_check);
} else {
// Simply use the outer function context in building the graph.
- CreateGraphBody();
+ CreateGraphBody(stack_check);
}
// Finish the basic structure of the graph.
@@ -483,7 +483,7 @@ bool AstGraphBuilder::CreateGraph(bool constant_context) {
}
-void AstGraphBuilder::CreateGraphBody() {
+void AstGraphBuilder::CreateGraphBody(bool stack_check) {
Scope* scope = info()->scope();
// Build the arguments object if it is used.
@@ -508,8 +508,10 @@ void AstGraphBuilder::CreateGraphBody() {
VisitDeclarations(scope->declarations());
// Build a stack-check before the body.
- Node* node = NewNode(javascript()->StackCheck());
- PrepareFrameState(node, BailoutId::FunctionEntry());
+ if (stack_check) {
+ Node* node = NewNode(javascript()->StackCheck());
+ PrepareFrameState(node, BailoutId::FunctionEntry());
+ }
// Visit statements in the function body.
VisitStatements(info()->function()->body());
« no previous file with comments | « src/compiler/ast-graph-builder.h ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698