Index: src/interpreter/bytecode-generator.cc |
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
index 58f6e7288dc9c71e5c37863e4c643c0dbbfafaa0..38a280a4d746b2c4f9b807324938d2f6ce658fd5 100644 |
--- a/src/interpreter/bytecode-generator.cc |
+++ b/src/interpreter/bytecode-generator.cc |
@@ -3010,8 +3010,8 @@ void BytecodeGenerator::VisitNewLocalFunctionContext() { |
.StoreAccumulatorInRegister(scope_info) |
.CallRuntime(Runtime::kNewScriptContext, closure, 2); |
} else { |
- builder()->CallRuntime(Runtime::kNewFunctionContext, |
- Register::function_closure(), 1); |
+ int slot_count = scope->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
+ builder()->CreateFunctionContext(slot_count); |
} |
execution_result()->SetResultInAccumulator(); |
} |