Merge V8 at branches/3.2 r8606: Initial merge by Git.

Change-Id: I9906d4a1145c7fab2ad78e7a9c375205c56d1287
diff --git a/src/compiler.cc b/src/compiler.cc
index 86d5de3..d8c7706 100755
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -233,10 +233,12 @@
   //
   // 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::kMinFixedIndex;
+  const int locals_limit = LUnallocated::kMaxFixedIndex;
   Scope* scope = info->scope();
-  if ((scope->num_parameters() + 1) > limit ||
-      scope->num_stack_slots() > limit) {
+  if ((scope->num_parameters() + 1) > parameter_limit ||
+      (info->osr_ast_id() != AstNode::kNoNumber &&
+       scope->num_parameters() + 1 + scope->num_stack_slots() > locals_limit)) {
     AbortAndDisable(info);
     // True indicates the compilation pipeline is still going, not
     // necessarily that we optimized the code.