summaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/js-frame-specialization.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/compiler/js-frame-specialization.cc')
-rw-r--r--deps/v8/src/compiler/js-frame-specialization.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/deps/v8/src/compiler/js-frame-specialization.cc b/deps/v8/src/compiler/js-frame-specialization.cc
index 98b1827492..6e4b0def56 100644
--- a/deps/v8/src/compiler/js-frame-specialization.cc
+++ b/deps/v8/src/compiler/js-frame-specialization.cc
@@ -52,7 +52,10 @@ Reduction JSFrameSpecialization::ReduceParameter(Node* node) {
if (index == Linkage::kJSFunctionCallClosureParamIndex) {
object = frame()->function();
} else if (index == parameters_count) {
- // The Parameter index (arity + 1) is the context.
+ // The Parameter index (arity + 1) is the parameter count.
+ object = Smi::FromInt(parameters_count - 1);
+ } else if (index == parameters_count + 1) {
+ // The Parameter index (arity + 2) is the context.
object = frame()->context();
} else {
// The Parameter index 0 is the receiver.