| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index 380e60efde55b8854e0cd6234e9bde9ab819a316..c45aaed1dfe58088f5c06fbaa3748ea27e89c63a 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -5464,7 +5464,9 @@ void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) {
|
| // space for nested functions that don't need literals cloning.
|
| Handle<SharedFunctionInfo> shared_info = instr->shared_info();
|
| bool pretenure = instr->hydrogen()->pretenure();
|
| - if (!pretenure && shared_info->num_literals() == 0) {
|
| + if (!pretenure &&
|
| + shared_info->num_literals() == 0 &&
|
| + !shared_info->is_generator()) {
|
| FastNewClosureStub stub(shared_info->language_mode());
|
| __ Push(shared_info);
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
|
|