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 2a96d293a7932af229a635b147d915adf026aa60..d850c60360c801b5f51ecc6ce2c17d40e077fa10 100644 |
--- a/src/full-codegen/s390/full-codegen-s390.cc |
+++ b/src/full-codegen/s390/full-codegen-s390.cc |
@@ -210,8 +210,8 @@ void FullCodeGenerator::Generate() { |
if (info->scope()->new_target_var() != nullptr) { |
__ push(r5); // Preserve new target. |
} |
- if (slots <= FastNewFunctionContextStub::kMaximumSlots) { |
- FastNewFunctionContextStub stub(isolate()); |
+ if (slots <= FastNewFunctionContextStub::MaximumSlots()) { |
+ FastNewFunctionContextStub stub(isolate(), info->scope()->scope_type()); |
__ mov(FastNewFunctionContextDescriptor::SlotsRegister(), |
Operand(slots)); |
__ CallStub(&stub); |
@@ -219,6 +219,7 @@ void FullCodeGenerator::Generate() { |
need_write_barrier = false; |
} else { |
__ push(r3); |
+ __ Push(Smi::FromInt(info->scope()->scope_type())); |
__ CallRuntime(Runtime::kNewFunctionContext); |
} |
if (info->scope()->new_target_var() != nullptr) { |