| Index: src/interpreter/bytecode-generator.cc
|
| diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
|
| index a57399cf6f046e4ee3150e55293a78fa027114d1..6ff43a41707fe4281df987e3c4877526cd3d0291 100644
|
| --- a/src/interpreter/bytecode-generator.cc
|
| +++ b/src/interpreter/bytecode-generator.cc
|
| @@ -3168,7 +3168,12 @@ void BytecodeGenerator::VisitNewLocalFunctionContext() {
|
| .CallRuntime(Runtime::kNewScriptContext, closure, 2);
|
| } else {
|
| int slot_count = scope->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
|
| - builder()->CreateFunctionContext(slot_count);
|
| + if (slot_count <= FastNewFunctionContextStub::kMaximumSlots) {
|
| + builder()->CreateFunctionContext(slot_count);
|
| + } else {
|
| + builder()->CallRuntime(Runtime::kNewFunctionContext,
|
| + Register::function_closure(), 1);
|
| + }
|
| }
|
| execution_result()->SetResultInAccumulator();
|
| }
|
|
|