| Index: src/compiler/js-generic-lowering.cc
|
| diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc
|
| index 57b976976c20f804b9e28d51ae8a55605a3e11c4..8a07976a66136e8576e514ab902baff6413ff88c 100644
|
| --- a/src/compiler/js-generic-lowering.cc
|
| +++ b/src/compiler/js-generic-lowering.cc
|
| @@ -458,6 +458,18 @@ void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) {
|
| }
|
| }
|
|
|
| +void JSGenericLowering::LowerJSCreateEvalContext(Node* node) {
|
| + int const slot_count = OpParameter<int>(node->op());
|
| + CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
| +
|
| + if (slot_count <= FastNewFunctionContextStub::kMaximumSlots) {
|
| + Callable callable = CodeFactory::FastNewEvalContext(isolate());
|
| + node->InsertInput(zone(), 1, jsgraph()->Int32Constant(slot_count));
|
| + ReplaceWithStubCall(node, callable, flags);
|
| + } else {
|
| + ReplaceWithRuntimeCall(node, Runtime::kNewEvalContext);
|
| + }
|
| +}
|
|
|
| void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) {
|
| ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject);
|
|
|