210 return InternalizeUtf8String(base::CStrVector(str));
214 using FactoryBase::InternalizeString;
217 bool convert_encoding =
false) {
223 bool convert_encoding =
false) {
227 template <
typename SeqString,
template <
typename>
typename HandleType>
230 Handle<String> InternalizeSubString(HandleType<SeqString>, uint32_t from,
232 bool convert_encoding =
false);
243 template <
typename T>
247 template <
typename T>
248 requires(std::is_convertible_v<Handle<T>,
Handle<Name>>)
251 template <
typename T>
255 template <
typename T>
281 const char (&str)[N],
AllocationType allocation = AllocationType::kYoung);
292#if V8_ENABLE_WEBASSEMBLY
320#if V8_ENABLE_WEBASSEMBLY
324 NewStringFromTwoByteLittleEndian(
332 int len, uint32_t hash_field);
345 ComputeInternalizationStrategyForString(
350 template <
class StringClass>
381 template <
typename T,
template <
typename>
typename HandleType>
382 requires(std::is_convertible_v<HandleType<T>, HandleType<String>>)
383 inline HandleType<String> NewSubString(HandleType<T> str, uint32_t begin,
449 int aliased_context_slot);
458 call_site_infos_or_formatted_stack,
474 int bytecode_offset_or_source_position,
489 template <ExternalPo
interTag tag>
491 Address addr,
AllocationType allocation_type = AllocationType::kYoung);
522 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND,
523 int inobject_properties = 0,
528 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND,
529 int inobject_properties = 0,
535 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND,
536 int inobject_properties = 0,
542 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND,
543 int inobject_properties = 0,
548 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND,
549 int inobject_properties = 0,
554 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND,
555 int inobject_properties = 0,
591 int capacity,
AllocationType allocation = AllocationType::kYoung);
686 ArrayStorageAllocationMode::DONT_INITIALIZE_ARRAY_ELEMENTS,
690 int capacity,
ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND,
696 elements_kind, 0, capacity,
697 ArrayStorageAllocationMode::INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE,
708 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND,
716 void NewJSArrayStorage(
719 ArrayStorageAllocationMode::DONT_INITIALIZE_ARRAY_ELEMENTS);
738#if V8_ENABLE_WEBASSEMBLY
805 uint32_t segment_index, uint32_t start_offset, uint32_t length,
826 std::shared_ptr<BackingStore> backing_store,
834 size_t byte_length,
size_t max_byte_length,
InitializedFlag initialized,
839 std::shared_ptr<BackingStore> backing_store);
843 size_t* element_size);
848 size_t byte_offset,
size_t length,
849 bool is_length_tracking =
false);
853 size_t byte_length,
bool is_length_tracking =
false);
905 Address off_heap_entry);
914 DirectHandle<Object> NewInvalidStringLengthError();
916 inline DirectHandle<Object> NewURIError();
919 MessageTemplate template_index,
922 DirectHandle<JSObject> NewSuppressedErrorAtDisposal(
923 Isolate* isolate, DirectHandle<Object> error,
924 DirectHandle<Object> suppressed_error);
926 template <
typename... Args>
930 std::conjunction_v<std::is_convertible<Args, DirectHandle<Object>>...>)
932 return NewError(constructor, template_index,
941 template <
typename... Args>
946 std::conjunction_v<std::is_convertible<Args, DirectHandle<Object>>...>)
948 return ShadowRealmNewTypeErrorCopy(
949 original, template_index,
953#define DECLARE_ERROR(NAME) \
954 Handle<JSObject> New##NAME(MessageTemplate template_index, \
955 base::Vector<const DirectHandle<Object>> args); \
957 template <typename... Args> \
958 requires(std::is_convertible_v<Args, DirectHandle<Object>> && ...) \
959 Handle<JSObject> New##NAME(MessageTemplate template_index, Args... args) { \
960 return New##NAME(template_index, \
961 base::VectorOf<DirectHandle<Object>>({args...})); \
977 Handle<String> SizeToString(
size_t value,
bool check_cache =
true);
979 bool check_cache =
true) {
980 return SizeToString(value, check_cache);
983#define ROOT_ACCESSOR(Type, name, CamelName) inline Handle<Type> name();
988 Handle<SharedFunctionInfo> NewSharedFunctionInfoForApiFunction(
989 MaybeDirectHandle<String> maybe_name,
990 DirectHandle<FunctionTemplateInfo> function_template_info,
993 Handle<SharedFunctionInfo> NewSharedFunctionInfoForBuiltin(
994 MaybeDirectHandle<String> name, Builtin builtin,
int len,
995 AdaptArguments adapt, FunctionKind
kind = FunctionKind::kNormalFunction);
997 DirectHandle<InterpreterData> NewInterpreterData(
998 DirectHandle<BytecodeArray> bytecode_array, DirectHandle<Code> code);
1025 int start_position,
int end_position,
1039 int data_count,
AllocationType allocation = AllocationType::kOld);
1054 int capture_count, uint32_t backtrack_limit);
1060 JSRegExp::Flags flags,
int capture_count);
1063 JSRegExp::Flags flags,
1066 JSRegExp::Flags flags,
1068 uint32_t backtrack_limit);
1085 return New(map, allocation);
1121 allocation_type_ = v;
1125 maybe_feedback_cell_ = v;
1165 self_reference_ = self_reference;
1178 inlined_bytecode_size_ =
size;
1190 DCHECK(!table.is_null());
1195 inline CodeBuilder& set_empty_source_position_table();
1199 DCHECK(!table.is_null());
1200 bytecode_offset_table_ = table;
1208 deoptimization_data_ = deopt_data;
1217 is_context_specialized_ =
true;
1223 is_turbofanned_ =
true;
1238 profiler_data_ = profiler_data;
1249 bool retry_allocation_or_fail);
1259 uint32_t inlined_bytecode_size_ = 0;
1266 bool is_context_specialized_ =
false;
1267 bool is_turbofanned_ =
false;
1268 uint32_t stack_slots_ = 0;
1269 uint16_t parameter_count_ = 0;
1291 bool CanAllocateInReadOnlySpace();
1292 bool EmptyStringRootIsInitialized();
1301 template <
typename MetaMapProv
iderFunc>
1303 MetaMapProviderFunc&& meta_map_provider,
InstanceType type,
1305 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND,
1306 int inobject_properties = 0,
1316 size_t byte_length);
1325 int variadic_part_length,
1328 template <
typename T>
1336 template <
typename T>
1340 template <
typename T>
1349 int NumberToStringCacheHash(
double number);
1376 ArrayStorageAllocationMode::DONT_INITIALIZE_ARRAY_ELEMENTS);
1382 void InitializeJSObjectFromMap(
1391 int capacity,
AllocationType allocation = AllocationType::kYoung);
1393#if V8_ENABLE_WEBASSEMBLY
1400#if V8_ENABLE_DRUMBRAKE