| Index: src/code-stubs.h
|
| diff --git a/src/code-stubs.h b/src/code-stubs.h
|
| index f110f21f451638e6f11d08d1fb792eaea8f5a1ae..9590fbc489cd7989e01f84130e02a07cda54255a 100644
|
| --- a/src/code-stubs.h
|
| +++ b/src/code-stubs.h
|
| @@ -113,6 +113,7 @@ class ObjectLiteral;
|
| V(FastCloneShallowObject) \
|
| V(FastNewClosure) \
|
| V(FastNewFunctionContext) \
|
| + V(FastNewEvalContext) \
|
| V(KeyedLoadSloppyArguments) \
|
| V(KeyedStoreSloppyArguments) \
|
| V(LoadScriptContextField) \
|
| @@ -865,6 +866,27 @@ class FastNewFunctionContextStub final : public TurboFanCodeStub {
|
| DEFINE_TURBOFAN_CODE_STUB(FastNewFunctionContext, TurboFanCodeStub);
|
| };
|
|
|
| +class FastNewEvalContextStub final : public TurboFanCodeStub {
|
| + public:
|
| + static const int kMaximumSlots = 0x8000;
|
| +
|
| + explicit FastNewEvalContextStub(Isolate* isolate)
|
| + : TurboFanCodeStub(isolate) {}
|
| +
|
| + static compiler::Node* Generate(CodeStubAssembler* assembler,
|
| + compiler::Node* function,
|
| + compiler::Node* slots,
|
| + compiler::Node* context);
|
| +
|
| + private:
|
| + // FastNewEvalContextStub 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(FastNewEvalContext);
|
| + DEFINE_TURBOFAN_CODE_STUB(FastNewEvalContext, TurboFanCodeStub);
|
| +};
|
|
|
| class FastNewObjectStub final : public PlatformCodeStub {
|
| public:
|
|
|