| Index: src/compiler/js-generic-lowering.cc
|
| diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc
|
| index 1a8634db51006b6bb72e9efe774346bcc78a31c0..6c26f6efdb9df7cbc93f1c3b8ba930d7192f07c3 100644
|
| --- a/src/compiler/js-generic-lowering.cc
|
| +++ b/src/compiler/js-generic-lowering.cc
|
| @@ -351,14 +351,19 @@ void JSGenericLowering::LowerJSCreateClosure(Node* node) {
|
|
|
|
|
| void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) {
|
| - int const slot_count = OpParameter<int>(node->op());
|
| + const CreateFunctionContextParameters& parameters =
|
| + CreateFunctionContextParametersOf(node->op());
|
| + int slot_count = parameters.slot_count();
|
| + ScopeType scope_type = parameters.scope_type();
|
| CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
|
|
| - if (slot_count <= FastNewFunctionContextStub::kMaximumSlots) {
|
| - Callable callable = CodeFactory::FastNewFunctionContext(isolate());
|
| + if (slot_count <= FastNewFunctionContextStub::MaximumSlots()) {
|
| + Callable callable =
|
| + CodeFactory::FastNewFunctionContext(isolate(), scope_type);
|
| node->InsertInput(zone(), 1, jsgraph()->Int32Constant(slot_count));
|
| ReplaceWithStubCall(node, callable, flags);
|
| } else {
|
| + node->InsertInput(zone(), 1, jsgraph()->SmiConstant(scope_type));
|
| ReplaceWithRuntimeCall(node, Runtime::kNewFunctionContext);
|
| }
|
| }
|
|
|