| Index: src/interpreter/bytecode-generator.cc
|
| diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
|
| index c6b6280bc5a0d9ef00a0b7593b45a36a83ac3b32..db5a596b85ba8e6bf5faae6ba309aa50517c2a3f 100644
|
| --- a/src/interpreter/bytecode-generator.cc
|
| +++ b/src/interpreter/bytecode-generator.cc
|
| @@ -2917,7 +2917,12 @@ void BytecodeGenerator::BuildNewLocalActivationContext() {
|
| .CallRuntime(Runtime::kPushModuleContext, args);
|
| } 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());
|
| + }
|
| }
|
| }
|
|
|
|
|