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

Unified Diff: src/compiler/js-frame-specialization.cc

Issue 1429233004: [turbofan] Fix wrong parameter indices in JSFrameSpecialization. (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 | « no previous file | test/mjsunit/regress/regress-crbug-552304.js » ('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 98b1827492545fd96a88a935cabfd33b6d8f36bd..6e4b0def567061b94ee4959282383923e766bba0 100644
--- a/src/compiler/js-frame-specialization.cc
+++ b/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.
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-552304.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698