diff options
Diffstat (limited to 'deps/v8/src/factory.h')
-rw-r--r-- | deps/v8/src/factory.h | 53 |
1 files changed, 33 insertions, 20 deletions
diff --git a/deps/v8/src/factory.h b/deps/v8/src/factory.h index d059b10888..c2aa069810 100644 --- a/deps/v8/src/factory.h +++ b/deps/v8/src/factory.h @@ -69,22 +69,12 @@ class V8_EXPORT_PRIVATE Factory final { // Create a new boxed value. Handle<Box> NewBox(Handle<Object> value); - // Create a new PromiseReactionJobInfo struct. - Handle<PromiseReactionJobInfo> NewPromiseReactionJobInfo( - Handle<Object> value, Handle<Object> tasks, Handle<Object> deferred, - Handle<Object> debug_id, Handle<Object> debug_name, - Handle<Context> context); - - // Create a new PromiseResolveThenableJobInfo struct. - Handle<PromiseResolveThenableJobInfo> NewPromiseResolveThenableJobInfo( - Handle<JSReceiver> thenable, Handle<JSReceiver> then, - Handle<JSFunction> resolve, Handle<JSFunction> reject, - Handle<Object> debug_id, Handle<Object> debug_name, - Handle<Context> context); - // Create a new PrototypeInfo struct. Handle<PrototypeInfo> NewPrototypeInfo(); + // Create a new Tuple2 struct. + Handle<Tuple2> NewTuple2(Handle<Object> value1, Handle<Object> value2); + // Create a new Tuple3 struct. Handle<Tuple3> NewTuple3(Handle<Object> value1, Handle<Object> value2, Handle<Object> value3); @@ -93,6 +83,10 @@ class V8_EXPORT_PRIVATE Factory final { Handle<ContextExtension> NewContextExtension(Handle<ScopeInfo> scope_info, Handle<Object> extension); + // Create a new ConstantElementsPair struct. + Handle<ConstantElementsPair> NewConstantElementsPair( + ElementsKind elements_kind, Handle<FixedArrayBase> constant_values); + // Create a pre-tenured empty AccessorPair. Handle<AccessorPair> NewAccessorPair(); @@ -293,8 +287,9 @@ class V8_EXPORT_PRIVATE Factory final { Handle<JSFunction> function, Handle<ScopeInfo> scope_info); - // Create a function context. - Handle<Context> NewFunctionContext(int length, Handle<JSFunction> function); + // Create a function or eval context. + Handle<Context> NewFunctionContext(int length, Handle<JSFunction> function, + ScopeType scope_type); // Create a catch context. Handle<Context> NewCatchContext(Handle<JSFunction> function, @@ -319,8 +314,6 @@ class V8_EXPORT_PRIVATE Factory final { Handle<Context> NewBlockContext(Handle<JSFunction> function, Handle<Context> previous, Handle<ScopeInfo> scope_info); - // Create a promise context. - Handle<Context> NewPromiseResolvingFunctionContext(int length); // Allocate a new struct. The struct is pretenured (allocated directly in // the old generation). @@ -435,6 +428,12 @@ class V8_EXPORT_PRIVATE Factory final { MutableMode mode = IMMUTABLE, PretenureFlag pretenure = NOT_TENURED); + Handle<HeapNumber> NewMutableHeapNumber( + PretenureFlag pretenure = NOT_TENURED) { + double hole_nan = bit_cast<double>(kHoleNanInt64); + return NewHeapNumber(hole_nan, MUTABLE, pretenure); + } + #define SIMD128_NEW_DECL(TYPE, Type, type, lane_count, lane_type) \ Handle<Type> New##Type(lane_type lanes[lane_count], \ PretenureFlag pretenure = NOT_TENURED); @@ -540,9 +539,6 @@ class V8_EXPORT_PRIVATE Factory final { Handle<JSMapIterator> NewJSMapIterator(); Handle<JSSetIterator> NewJSSetIterator(); - Handle<JSFixedArrayIterator> NewJSFixedArrayIterator( - Handle<FixedArray> array); - // Allocates a bound function. MaybeHandle<JSBoundFunction> NewJSBoundFunction( Handle<JSReceiver> target_function, Handle<Object> bound_this, @@ -575,6 +571,15 @@ class V8_EXPORT_PRIVATE Factory final { Handle<JSFunction> NewFunctionFromSharedFunctionInfo( Handle<Map> initial_map, Handle<SharedFunctionInfo> function_info, + Handle<Object> context_or_undefined, Handle<LiteralsArray> literals, + PretenureFlag pretenure = TENURED); + + Handle<JSFunction> NewFunctionFromSharedFunctionInfo( + Handle<SharedFunctionInfo> function_info, Handle<Context> context, + Handle<LiteralsArray> literals, PretenureFlag pretenure = TENURED); + + Handle<JSFunction> NewFunctionFromSharedFunctionInfo( + Handle<Map> initial_map, Handle<SharedFunctionInfo> function_info, Handle<Object> context_or_undefined, PretenureFlag pretenure = TENURED); Handle<JSFunction> NewFunctionFromSharedFunctionInfo( @@ -645,6 +650,7 @@ class V8_EXPORT_PRIVATE Factory final { DECLARE_ERROR(SyntaxError) DECLARE_ERROR(TypeError) DECLARE_ERROR(WasmCompileError) + DECLARE_ERROR(WasmLinkError) DECLARE_ERROR(WasmRuntimeError) #undef DECLARE_ERROR @@ -706,6 +712,9 @@ class V8_EXPORT_PRIVATE Factory final { MaybeHandle<Code> code, bool is_constructor); + Handle<SharedFunctionInfo> NewSharedFunctionInfoForLiteral( + FunctionLiteral* literal, Handle<Script> script); + static bool IsFunctionModeWithPrototype(FunctionMode function_mode) { return (function_mode == FUNCTION_WITH_WRITEABLE_PROTOTYPE || function_mode == FUNCTION_WITH_READONLY_PROTOTYPE); @@ -716,6 +725,8 @@ class V8_EXPORT_PRIVATE Factory final { Handle<Map> CreateStrictFunctionMap(FunctionMode function_mode, Handle<JSFunction> empty_function); + Handle<Map> CreateClassFunctionMap(Handle<JSFunction> empty_function); + // Allocates a new JSMessageObject object. Handle<JSMessageObject> NewJSMessageObject(MessageTemplate::Template message, Handle<Object> argument, @@ -797,6 +808,8 @@ class V8_EXPORT_PRIVATE Factory final { void SetStrictFunctionInstanceDescriptor(Handle<Map> map, FunctionMode function_mode); + + void SetClassFunctionInstanceDescriptor(Handle<Map> map); }; } // namespace internal |