| Index: src/code-stubs.h
|
| diff --git a/src/code-stubs.h b/src/code-stubs.h
|
| index 0fff222bc55ba1ed6471056475d34e04e88312bc..5c83fdebb0ffa5a268f8fc4f6d750c3e6d1f24c2 100644
|
| --- a/src/code-stubs.h
|
| +++ b/src/code-stubs.h
|
| @@ -1100,6 +1100,8 @@ class FastNewClosureStub : public TurboFanCodeStub {
|
|
|
| class FastNewFunctionContextStub final : public TurboFanCodeStub {
|
| public:
|
| + static const int kMaximumSlots = 0x8000;
|
| +
|
| explicit FastNewFunctionContextStub(Isolate* isolate)
|
| : TurboFanCodeStub(isolate) {}
|
|
|
| @@ -1109,6 +1111,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);
|
| };
|
|
|