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

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

Issue 1259203002: [turbofan] Implement tail calls with differing stack parameter counts (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix bugs in frameless tail calls Created 5 years, 5 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 | « no previous file | src/compiler/code-generator.h » ('j') | src/compiler/ia32/code-generator-ia32.cc » ('J')
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 7ccb8aa320d18044f9bdf1ab77f9d37f371f9eed..cca187c81a24e6ddf4d44fcb2ca01c366eb02af3 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -2601,7 +2601,12 @@ void AstGraphBuilder::VisitCallRuntime(CallRuntime* expr) {
// Create node to perform the runtime call.
Runtime::FunctionId functionId = function->function_id;
- const Operator* call = javascript()->CallRuntime(functionId, args->length());
+ // Outer-most frame of calls into native function chains must have a frame in
+ // the stack crawl.
+ TailCallMode mode =
Benedikt Meurer 2015/07/30 06:47:24 IMHO this will be highly confusing and might be a
+ info()->shared_info()->native() ? NO_TAIL_CALLS : ALLOW_TAIL_CALLS;
+ const Operator* call =
+ javascript()->CallRuntime(functionId, args->length(), mode);
FrameStateBeforeAndAfter states(this, expr->CallId());
Node* value = ProcessArguments(call, args->length());
states.AddToNode(value, expr->id(), ast_context()->GetStateCombine());
« no previous file with comments | « no previous file | src/compiler/code-generator.h » ('j') | src/compiler/ia32/code-generator-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698