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

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

Issue 1461973002: [turbofan] Make new.target explicit in JSCallDescriptor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/arm64/macro-assembler-arm64.h ('k') | src/compiler/bytecode-graph-builder.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 01a372eeaa5344f17c9fd22ffd3fe1c2911a1b5c..4b9c97c5d526e3149cca91c50c10cbf58b27e30a 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -472,8 +472,8 @@ Node* AstGraphBuilder::GetFunctionClosureForContext() {
Node* AstGraphBuilder::GetFunctionClosure() {
if (!function_closure_.is_set()) {
- const Operator* op = common()->Parameter(
- Linkage::kJSFunctionCallClosureParamIndex, "%closure");
+ int index = Linkage::kJSCallClosureParamIndex;
+ const Operator* op = common()->Parameter(index, "%closure");
Node* node = NewNode(op, graph()->start());
function_closure_.set(node);
}
@@ -483,9 +483,9 @@ Node* AstGraphBuilder::GetFunctionClosure() {
Node* AstGraphBuilder::GetFunctionContext() {
if (!function_context_.is_set()) {
- // Parameter (arity + 2) is special for the outer context of the function
- const Operator* op = common()->Parameter(
- info()->num_parameters_including_this() + 1, "%context");
+ int params = info()->num_parameters_including_this();
+ int index = Linkage::GetJSCallContextParamIndex(params);
+ const Operator* op = common()->Parameter(index, "%context");
Node* node = NewNode(op, graph()->start());
function_context_.set(node);
}
@@ -498,9 +498,9 @@ bool AstGraphBuilder::CreateGraph(bool stack_check) {
DCHECK(graph() != NULL);
// Set up the basic structure of the graph. Outputs for {Start} are the formal
- // parameters (including the receiver) plus number of arguments, context and
- // closure.
- int actual_parameter_count = info()->num_parameters_including_this() + 3;
+ // parameters (including the receiver) plus new target, number of arguments,
+ // context and closure.
+ int actual_parameter_count = info()->num_parameters_including_this() + 4;
graph()->SetStart(graph()->NewNode(common()->Start(actual_parameter_count)));
// Initialize the top-level environment.
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698