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

Unified Diff: src/compiler/js-frame-specialization.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/compiler/bytecode-graph-builder.cc ('k') | src/compiler/js-inlining.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-frame-specialization.cc
diff --git a/src/compiler/js-frame-specialization.cc b/src/compiler/js-frame-specialization.cc
index 6e4b0def567061b94ee4959282383923e766bba0..46ad4541993128efad67e948b93e42def059e5b1 100644
--- a/src/compiler/js-frame-specialization.cc
+++ b/src/compiler/js-frame-specialization.cc
@@ -49,13 +49,14 @@ Reduction JSFrameSpecialization::ReduceParameter(Node* node) {
Object* object;
int const index = ParameterIndexOf(node->op());
int const parameters_count = frame()->ComputeParametersCount() + 1;
- if (index == Linkage::kJSFunctionCallClosureParamIndex) {
+ if (index == Linkage::kJSCallClosureParamIndex) {
+ // The Parameter index references the closure.
object = frame()->function();
- } else if (index == parameters_count) {
- // The Parameter index (arity + 1) is the parameter count.
+ } else if (index == Linkage::GetJSCallArgCountParamIndex(parameters_count)) {
+ // The Parameter index references the parameter count.
object = Smi::FromInt(parameters_count - 1);
- } else if (index == parameters_count + 1) {
- // The Parameter index (arity + 2) is the context.
+ } else if (index == Linkage::GetJSCallContextParamIndex(parameters_count)) {
+ // The Parameter index references the context.
object = frame()->context();
} else {
// The Parameter index 0 is the receiver.
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/js-inlining.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698