| Index: src/code-stubs.h
|
| diff --git a/src/code-stubs.h b/src/code-stubs.h
|
| index 8a3a2f7c6d6d1cb58d6258b8b31b42df89c4a490..01e2af350c86ce28541f213c244775e2602da086 100644
|
| --- a/src/code-stubs.h
|
| +++ b/src/code-stubs.h
|
| @@ -863,6 +863,8 @@ class FastNewClosureStub : public TurboFanCodeStub {
|
|
|
| class FastNewFunctionContextStub final : public TurboFanCodeStub {
|
| public:
|
| + static const int kMaximumSlots = 0x8000;
|
| +
|
| explicit FastNewFunctionContextStub(Isolate* isolate)
|
| : TurboFanCodeStub(isolate) {}
|
|
|
| @@ -872,6 +874,11 @@ class FastNewFunctionContextStub final : public TurboFanCodeStub {
|
| compiler::Node* context);
|
|
|
| private:
|
| + // FastNewFunctionContextStub can only allocate closures which fit in the
|
| + // new space.
|
| + STATIC_ASSERT(((kMaximumSlots + Context::MIN_CONTEXT_SLOTS) * kPointerSize +
|
| + FixedArray::kHeaderSize) < kMaxRegularHeapObjectSize);
|
| +
|
| DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewFunctionContext);
|
| DEFINE_TURBOFAN_CODE_STUB(FastNewFunctionContext, TurboFanCodeStub);
|
| };
|
|
|