| Index: src/full-codegen/s390/full-codegen-s390.cc
|
| diff --git a/src/full-codegen/s390/full-codegen-s390.cc b/src/full-codegen/s390/full-codegen-s390.cc
|
| index c1e838dbea781514e886a7ec7b29bf65037a0080..6c9ac5285fed025dc0ba6cfcda0fb609c0b1b0e4 100644
|
| --- a/src/full-codegen/s390/full-codegen-s390.cc
|
| +++ b/src/full-codegen/s390/full-codegen-s390.cc
|
| @@ -212,11 +212,17 @@ void FullCodeGenerator::Generate() {
|
| if (info->scope()->new_target_var() != nullptr) {
|
| __ push(r5); // Preserve new target.
|
| }
|
| - FastNewFunctionContextStub stub(isolate());
|
| - __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots));
|
| - __ CallStub(&stub);
|
| - // Result of FastNewFunctionContextStub is always in new space.
|
| - need_write_barrier = false;
|
| + if (slots <= FastNewFunctionContextStub::kMaximumSlots) {
|
| + FastNewFunctionContextStub stub(isolate());
|
| + __ mov(FastNewFunctionContextDescriptor::SlotsRegister(),
|
| + Operand(slots));
|
| + __ CallStub(&stub);
|
| + // Result of FastNewFunctionContextStub is always in new space.
|
| + need_write_barrier = false;
|
| + } else {
|
| + __ push(r3);
|
| + __ CallRuntime(Runtime::kNewFunctionContext);
|
| + }
|
| if (info->scope()->new_target_var() != nullptr) {
|
| __ pop(r5); // Preserve new target.
|
| }
|
|
|