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

Unified Diff: src/compiler.cc

Issue 6591042: When checking number of parameters in MakeCrankshaft code don't forget about receiver. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 10 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 | test/mjsunit/regress/regress-1209.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index f392cceb3cd593283663f46a9454a9d004a7e675..367de6488164bfb623c56be11a6a0f1b2ba0d534 100755
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -221,11 +221,12 @@ static bool MakeCrankshaftCode(CompilationInfo* info) {
// or perform on-stack replacement for function with too many
// stack-allocated local variables.
//
- // The encoding is as a signed value, with parameters using the negative
- // indices and locals the non-negative ones.
+ // The encoding is as a signed value, with parameters and receiver using
+ // the negative indices and locals the non-negative ones.
const int limit = LUnallocated::kMaxFixedIndices / 2;
Scope* scope = info->scope();
- if (scope->num_parameters() > limit || scope->num_stack_slots() > limit) {
+ if ((scope->num_parameters() + 1) > limit ||
+ scope->num_stack_slots() > limit) {
AbortAndDisable(info);
// True indicates the compilation pipeline is still going, not
// necessarily that we optimized the code.
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-1209.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698