diff options
Diffstat (limited to 'deps/v8/src/factory.h')
-rw-r--r-- | deps/v8/src/factory.h | 50 |
1 files changed, 32 insertions, 18 deletions
diff --git a/deps/v8/src/factory.h b/deps/v8/src/factory.h index f0e9d63885..966b0602fe 100644 --- a/deps/v8/src/factory.h +++ b/deps/v8/src/factory.h @@ -27,6 +27,8 @@ class AliasedArgumentsEntry; class BreakPointInfo; class BreakPoint; class BoilerplateDescription; +class CallableTask; +class CallbackTask; class ConstantElementsPair; class CoverageInfo; class DebugInfo; @@ -40,6 +42,7 @@ class JSWeakMap; class NewFunctionArgs; struct SourceRange; class PreParsedScopeData; +class PromiseResolveThenableJobTask; class TemplateObjectDescription; enum FunctionMode { @@ -101,7 +104,8 @@ class V8_EXPORT_PRIVATE Factory final { int length, PretenureFlag pretenure = NOT_TENURED); // Allocates an uninitialized fixed array. It must be filled by the caller. - Handle<FixedArray> NewUninitializedFixedArray(int length); + Handle<FixedArray> NewUninitializedFixedArray( + int length, PretenureFlag pretenure = NOT_TENURED); // Allocates a feedback vector whose slots are initialized with undefined // values. @@ -165,8 +169,7 @@ class V8_EXPORT_PRIVATE Factory final { // Create a new TemplateObjectDescription struct. Handle<TemplateObjectDescription> NewTemplateObjectDescription( - int hash, Handle<FixedArray> raw_strings, - Handle<FixedArray> cooked_strings); + Handle<FixedArray> raw_strings, Handle<FixedArray> cooked_strings); // Create a pre-tenured empty AccessorPair. Handle<AccessorPair> NewAccessorPair(); @@ -326,6 +329,7 @@ class V8_EXPORT_PRIVATE Factory final { // Create a symbol. Handle<Symbol> NewSymbol(); Handle<Symbol> NewPrivateSymbol(); + Handle<Symbol> NewPrivateFieldSymbol(); // Create a global (but otherwise uninitialized) context. Handle<Context> NewNativeContext(); @@ -386,16 +390,21 @@ class V8_EXPORT_PRIVATE Factory final { Handle<SourcePositionTableWithFrameCache> NewSourcePositionTableWithFrameCache( Handle<ByteArray> source_position_table, - Handle<NumberDictionary> stack_frame_cache); + Handle<SimpleNumberDictionary> stack_frame_cache); + + // Allocate various microtasks. + Handle<CallableTask> NewCallableTask(Handle<JSReceiver> callable, + Handle<Context> context); + Handle<CallbackTask> NewCallbackTask(Handle<Foreign> callback, + Handle<Foreign> data); + Handle<PromiseResolveThenableJobTask> NewPromiseResolveThenableJobTask( + Handle<JSPromise> promise_to_resolve, Handle<JSReceiver> then, + Handle<JSReceiver> thenable, Handle<Context> context); // Foreign objects are pretenured when allocated by the bootstrapper. Handle<Foreign> NewForeign(Address addr, PretenureFlag pretenure = NOT_TENURED); - // Allocate a new foreign object. The foreign is pretenured (allocated - // directly in the old generation). - Handle<Foreign> NewForeign(const AccessorDescriptor* foreign); - Handle<ByteArray> NewByteArray(int length, PretenureFlag pretenure = NOT_TENURED); @@ -417,9 +426,9 @@ class V8_EXPORT_PRIVATE Factory final { Handle<WeakCell> NewWeakCell(Handle<HeapObject> value); - Handle<Cell> NewNoClosuresCell(Handle<Object> value); - Handle<Cell> NewOneClosureCell(Handle<Object> value); - Handle<Cell> NewManyClosuresCell(Handle<Object> value); + Handle<FeedbackCell> NewNoClosuresCell(Handle<HeapObject> value); + Handle<FeedbackCell> NewOneClosureCell(Handle<HeapObject> value); + Handle<FeedbackCell> NewManyClosuresCell(Handle<HeapObject> value); Handle<TransitionArray> NewTransitionArray(int capacity); @@ -495,7 +504,8 @@ class V8_EXPORT_PRIVATE Factory final { // Allocates a new BigInt with {length} digits. Only to be used by // MutableBigInt::New*. - Handle<FreshlyAllocatedBigInt> NewBigInt(int length); + Handle<FreshlyAllocatedBigInt> NewBigInt( + int length, PretenureFlag pretenure = NOT_TENURED); Handle<JSObject> NewArgumentsObject(Handle<JSFunction> callee, int length); @@ -594,7 +604,7 @@ class V8_EXPORT_PRIVATE Factory final { Handle<JSIteratorResult> NewJSIteratorResult(Handle<Object> value, bool done); Handle<JSAsyncFromSyncIterator> NewJSAsyncFromSyncIterator( - Handle<JSReceiver> sync_iterator); + Handle<JSReceiver> sync_iterator, Handle<Object> next); Handle<JSMap> NewJSMap(); Handle<JSSet> NewJSSet(); @@ -635,12 +645,12 @@ class V8_EXPORT_PRIVATE Factory final { Handle<JSFunction> NewFunctionFromSharedFunctionInfo( Handle<Map> initial_map, Handle<SharedFunctionInfo> function_info, - Handle<Object> context_or_undefined, Handle<Cell> vector, + Handle<Object> context_or_undefined, Handle<FeedbackCell> feedback_cell, PretenureFlag pretenure = TENURED); Handle<JSFunction> NewFunctionFromSharedFunctionInfo( Handle<SharedFunctionInfo> function_info, Handle<Context> context, - Handle<Cell> vector, PretenureFlag pretenure = TENURED); + Handle<FeedbackCell> feedback_cell, PretenureFlag pretenure = TENURED); Handle<JSFunction> NewFunctionFromSharedFunctionInfo( Handle<Map> initial_map, Handle<SharedFunctionInfo> function_info, @@ -677,15 +687,14 @@ class V8_EXPORT_PRIVATE Factory final { Handle<Code> NewCode(const CodeDesc& desc, Code::Kind kind, Handle<Object> self_reference, int32_t builtin_index = Builtins::kNoBuiltinId, - MaybeHandle<HandlerTable> maybe_handler_table = - MaybeHandle<HandlerTable>(), MaybeHandle<ByteArray> maybe_source_position_table = MaybeHandle<ByteArray>(), MaybeHandle<DeoptimizationData> maybe_deopt_data = MaybeHandle<DeoptimizationData>(), Movability movability = kMovable, uint32_t stub_key = 0, bool is_turbofanned = false, int stack_slots = 0, - int safepoint_table_offset = 0); + int safepoint_table_offset = 0, + int handler_table_offset = 0); // Allocates a new, empty code object for use by builtin deserialization. The // given {size} argument specifies the size of the entire code object. @@ -848,6 +857,8 @@ class V8_EXPORT_PRIVATE Factory final { // Converts the given ToPrimitive hint to it's string representation. Handle<String> ToPrimitiveHintString(ToPrimitiveHint hint); + Handle<JSPromise> NewJSPromise(PretenureFlag pretenure = NOT_TENURED); + private: Isolate* isolate() { return reinterpret_cast<Isolate*>(this); } @@ -875,6 +886,9 @@ class V8_EXPORT_PRIVATE Factory final { // Create a JSArray with no elements and no length. Handle<JSArray> NewJSArray(ElementsKind elements_kind, PretenureFlag pretenure = NOT_TENURED); + + Handle<JSPromise> NewJSPromiseWithoutHook( + PretenureFlag pretenure = NOT_TENURED); }; // Utility class to simplify argument handling around JSFunction creation. |