| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index ef0a82cee326e059a894db84eb2e021231525c91..62402e18fa9ddf501dfe5ec973c3b846f3d9e7f0 100755
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -213,10 +213,11 @@ static bool MakeCrankshaftCode(CompilationInfo* info) {
|
| //
|
| // 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;
|
| + const int parameter_limit = (LUnallocated::kMaxFixedIndices / 2);
|
| + const int locals_limit = parameter_limit - 1;
|
| Scope* scope = info->scope();
|
| - if ((scope->num_parameters() + 1) > limit ||
|
| - scope->num_stack_slots() > limit) {
|
| + if ((scope->num_parameters() + 1) > parameter_limit ||
|
| + scope->num_stack_slots() > locals_limit) {
|
| info->AbortOptimization();
|
| Handle<JSFunction> closure = info->closure();
|
| info->shared_info()->DisableOptimization(*closure);
|
|
|