5#ifndef V8_OBJECTS_STRING_INL_H_
6#define V8_OBJECTS_STRING_INL_H_
52 if (IsNeeded(local_isolate)) {
59 Isolate* isolate = GetIsolateIfNeeded(str);
60 if (isolate !=
nullptr) {
61 mutex_guard.emplace(isolate->internalized_string_access());
67 if (IsNeeded(str, local_isolate)) {
77 return IsNeeded(local_isolate) && IsNeeded(str,
false);
81 if (check_local_heap) {
82 LocalHeap* local_heap = LocalHeap::Current();
89 if (ReadOnlyHeap::Contains(str)) {
108 DCHECK(!mutex_guard.has_value());
113 if (!IsNeeded(str))
return nullptr;
118 DCHECK(ReadOnlyHeap::Contains(str));
256template <
typename TDispatcher,
typename... TArgs>
259 switch (
StringShape(instance_type).representation_and_encoding_tag()) {
261 return TDispatcher::HandleSeqOneByteString(std::forward<TArgs>(
args)...);
263 return TDispatcher::HandleSeqTwoByteString(std::forward<TArgs>(
args)...);
266 return TDispatcher::HandleConsString(std::forward<TArgs>(
args)...);
268 return TDispatcher::HandleExternalOneByteString(
269 std::forward<TArgs>(
args)...);
271 return TDispatcher::HandleExternalTwoByteString(
272 std::forward<TArgs>(
args)...);
275 return TDispatcher::HandleSlicedString(std::forward<TArgs>(
args)...);
278 return TDispatcher::HandleThinString(std::forward<TArgs>(
args)...);
280 return TDispatcher::HandleInvalidString(std::forward<TArgs>(
args)...);
285#define STRING_CLASS_TYPES(V) \
286 V(SeqOneByteString) \
287 V(SeqTwoByteString) \
289 V(ExternalOneByteString) \
290 V(ExternalTwoByteString) \
294template <
typename TDispatcher>
307#if V8_STATIC_ROOTS_BOOL
335 switch (StringShape(
Tagged(
this)).representation_and_encoding_tag()) {
375 uint32_t type =
string->map()->instance_type();
385 string =
string->GetUnderlying();
398template <
typename Char>
402 if (
sizeof(Char) == 1) {
403 return static_cast<Char
>(
static_cast<const uint8_t*
>(
start_)[
index]);
409template <
typename Char>
413 bool convert =
false)
415 chars.begin(), chars.length(), seed),
419 bool convert =
false)
424 template <
typename IsolateT>
429 template <
typename IsolateT>
431 if (
sizeof(Char) == 1) {
436 isolate->factory()->NewOneByteInternalizedStringFromTwoByte(
458template <
typename SeqString>
461 using Char =
typename SeqString::Char;
466#if defined(V8_CC_MSVC)
468#pragma warning(disable : 4789)
471 int len,
bool convert =
false)
479 string->GetChars(no_gc) + from, len,
HashSeed(isolate));
487#if defined(V8_CC_MSVC)
503 isolate->factory()->AllocateRawOneByteInternalizedString(
511 isolate->factory()->AllocateRawTwoByteInternalizedString(
536 if (other ==
this)
return true;
537 if (IsInternalizedString(
this) && IsInternalizedString(other)) {
546 if (
one.is_identical_to(two))
return true;
547 if (IsInternalizedString(*
one) && IsInternalizedString(*two)) {
553template <String::EqualityType kEqType,
typename Char>
560template <String::EqualityType kEqType,
typename Char>
567template <String::EqualityType kEqType,
typename Char>
574template <String::EqualityType kEqType,
typename Char>
578 size_t len = str.
size();
581 if (
static_cast<size_t>(
length()) != len)
return false;
584 if (
static_cast<size_t>(
length()) < len)
return false;
593 int slice_offset = 0;
595 const Char* data = str.
data();
597 int32_t type =
string->map()->instance_type();
621 slice_offset += slicedString->offset();
622 string = slicedString->parent();
649template <
typename Char>
667 size_t len = std::min<size_t>(segment->length(), remaining_str.
size());
673 remaining_str += len;
674 if (remaining_str.
empty())
break;
685template <
typename Char>
691 ? Cast<typename CharTraits<Char>::ExternalString>(
this).GetChars()
692 : Cast<typename CharTraits<Char>::String>(
this).GetChars(no_gc);
695template <
typename Char>
701 ? Cast<typename CharTraits<Char>::ExternalString>(
this)->GetChars()
702 : Cast<typename CharTraits<Char>::String>(
this)->GetChars(
703 no_gc, access_guard);
712template <
template <
typename>
typename HandleType>
720 bool is_one_byte_representation;
730 if (
V8_UNLIKELY(raw_cons->first()->length() == 0)) {
733 raw_cons->set_first(
second);
735 DCHECK(raw_cons->IsFlat());
736 return HandleType<String>(
second, isolate);
747 length = raw_cons->length();
748 is_one_byte_representation = cons->IsOneByteRepresentation();
752 DCHECK_EQ(is_one_byte_representation, cons->IsOneByteRepresentation());
753 DCHECK(AllowGarbageCollection::IsAllowed());
755 HandleType<SeqString>
result;
756 if (is_one_byte_representation) {
757 HandleType<SeqOneByteString> flat =
759 ->NewRawOneByteString(length, allocation)
764 if constexpr (
v8_flags.always_use_string_forwarding_table.value()) {
765 if (!IsConsString(*cons)) {
766 DCHECK(IsInternalizedString(*cons) || IsThinString(*cons));
772 WriteToFlat2(flat->GetChars(no_gc), raw_cons, 0, length,
774 raw_cons->set_first(*flat);
778 HandleType<SeqTwoByteString> flat =
780 ->NewRawTwoByteString(length, allocation)
785 if constexpr (
v8_flags.always_use_string_forwarding_table.value()) {
786 if (!IsConsString(*cons)) {
787 DCHECK(IsInternalizedString(*cons) || IsThinString(*cons));
793 WriteToFlat2(flat->GetChars(no_gc), raw_cons, 0, length,
795 raw_cons->set_first(*flat);
807template <
typename T,
template <
typename>
typename HandleType>
821 if (!cons->IsFlat()) {
824 HandleType<String>
result =
841 return HandleType<String>(s, isolate);
845template <
typename T,
template <
typename>
typename HandleType>
857 uint32_t
offset, uint32_t length,
893#ifdef ENABLE_SLOW_DCHECKS
894 checksum_ = ComputeChecksum();
901#ifdef ENABLE_SLOW_DCHECKS
902 checksum_ = ComputeChecksum();
916 SLOW_DCHECK(checksum_ == kChecksumVerificationDisabled ||
917 checksum_ == ComputeChecksum());
920#ifdef ENABLE_SLOW_DCHECKS
921uint32_t String::FlatContent::ComputeChecksum()
const {
922 constexpr uint64_t hashseed = 1;
930 DCHECK_NE(kChecksumVerificationDisabled, hash);
938 std::optional<FlatContent> flat_content =
940 if (flat_content.has_value())
return flat_content.value();
944template <
typename T,
template <
typename>
typename HandleType>
950 isolate->factory()->ComputeSharingStrategyForString(
string, &new_map)) {
952 return SlowShare(isolate,
string);
981 return GetImpl(index, access_guard);
989 [&](
auto str) {
return str->Get(index, access_guard); });
1017 static_assert(offsetof(
ConsString, first_) ==
1021 return static_cast<const SlicedString*
>(
this)->parent();
1024template <
class Visitor>
1032template <
class Visitor>
1037 int slice_offset =
offset;
1038 const uint32_t length =
string->length();
1044 visitor->VisitOneByteString(
1051 visitor->VisitTwoByteString(
1058 visitor->VisitOneByteString(
1064 visitor->VisitTwoByteString(
1072 slice_offset += slicedString->offset();
1073 string = slicedString->parent();
1094 string =
Flatten(isolate,
string);
1097 FlatContent content =
string->GetFlatContent(no_gc);
1099 size_t utf8_length = 0;
1118 if (string->IsOneByteRepresentation())
return true;
1123 string =
Flatten(isolate,
string);
1157 return chars()[
index];
1169 const uint8_t*
string,
1170 uint32_t string_length) {
1174 memcpy(
address,
string, string_length);
1178 return reinterpret_cast<Address>(&chars()[0]);
1196 return reinterpret_cast<Address>(&chars()[0]);
1217 return chars()[
index];
1257 return map == roots.seq_one_byte_string_map() ||
1258 map == roots.shared_seq_one_byte_string_map();
1263 return map == roots.seq_two_byte_string_map() ||
1264 map == roots.shared_seq_two_byte_string_map();
1270 DCHECK(IsSeqString(parent) || IsExternalString(parent));
1271 parent_.store(
this, parent, mode);
1282 first_.store(
this, value, mode);
1288 second_.store(
this, value, mode);
1294 return second_.Relaxed_Load();
1302 actual_.store(
this, value, mode);
1306 return actual_.load();
1316 if (is_uncached())
return;
1322 if (is_uncached())
return;
1328 return resource_.load(isolate);
1332 resource_.store(isolate, value);
1333 if (IsExternalOneByteString(
this)) {
1341 return static_cast<uint32_t
>(resource_.load_encoded());
1346 if (is_uncached())
return;
1351 Address value = resource_.load(isolate);
1356 if (resource !=
nullptr) {
1366 return reinterpret_cast<const Resource*
>(resource_as_address());
1370 return reinterpret_cast<Resource*
>(resource_as_address());
1375 if (is_uncached()) {
1376 if (resource()->IsCacheable()) mutable_resource()->UpdateDataCache();
1378 resource_data_.store(isolate,
1385 set_resource(isolate, resource);
1386 size_t new_payload = resource ==
nullptr ? 0 : resource->
length();
1387 if (new_payload > 0) {
1388 isolate->heap()->UpdateExternalString(
this, 0, new_payload);
1394 resource_.store(isolate,
reinterpret_cast<Address>(resource));
1395 if (resource !=
nullptr) update_data_cache(isolate);
1400 auto res = resource();
1401 if (is_uncached()) {
1402 if (res->IsCacheable()) {
1405 return reinterpret_cast<const uint8_t*
>(res->cached_data());
1418 return reinterpret_cast<const uint8_t*
>(res->data());
1425 return GetChars()[
index];
1429 return reinterpret_cast<const Resource*
>(resource_as_address());
1433 return reinterpret_cast<Resource*
>(resource_as_address());
1438 if (is_uncached()) {
1439 if (resource()->IsCacheable()) mutable_resource()->UpdateDataCache();
1441 resource_data_.store(isolate,
1448 set_resource(isolate, resource);
1449 size_t new_payload = resource ==
nullptr ? 0 : resource->
length() * 2;
1450 if (new_payload > 0) {
1451 isolate->heap()->UpdateExternalString(
this, 0, new_payload);
1457 resource_.store(isolate,
reinterpret_cast<Address>(resource));
1458 if (resource !=
nullptr) update_data_cache(isolate);
1463 auto res = resource();
1464 if (is_uncached()) {
1465 if (res->IsCacheable()) {
1468 return res->cached_data();
1488 return GetChars()[
index];
1493 return GetChars() +
start;
1504 frames_[(depth_ - 1) & kDepthMask] =
string;
1508 if (depth_ > maximum_depth_) maximum_depth_ = depth_;
1513 DCHECK(depth_ <= maximum_depth_);
1522 inline uint16_t GetNext();
1523 inline bool HasMore();
1525 inline void VisitOneByteString(
const uint8_t* chars,
int length);
1526 inline void VisitTwoByteString(
const uint16_t* chars,
int length);
1540 DCHECK(buffer8_ !=
nullptr &&
end_ !=
nullptr);
1542 if (buffer8_ ==
end_) HasMore();
1544 return is_one_byte_ ? *buffer8_++ : *buffer16_++;
1551 : is_one_byte_(false), access_guard_(string) {
1564 if (!
string.is_null())
1574 if (
string.is_null())
return false;
1591 end_ =
reinterpret_cast<const uint8_t*
>(chars +
length);
1621 int first,
int length)
1624 length_(length == -1 ? string->length() : length),
1671 memset(
reinterpret_cast<void*
>(
reinterpret_cast<char*
>(
this) +
1679 memset(
reinterpret_cast<void*
>(
reinterpret_cast<char*
>(
this) +
1691 switch (instance_type) {
union v8::internal::@341::BuiltinMetadata::KindSpecificData data
#define SLOW_DCHECK(condition)
static const int kNoPreviousCharacter
static bool HasUnpairedSurrogate(const uint16_t *code_units, size_t length)
static unsigned Length(uchar chr, int previous)
static unsigned LengthOneByte(uint8_t chr)
virtual size_t length() const =0
virtual void Unaccount(Isolate *isolate)
virtual size_t length() const =0
static void Release_Store(T *addr, typename std::remove_reference< T >::type new_value)
static T Acquire_Load(T *addr)
static constexpr T decode(U value)
Vector< T > SubVector(size_t from, size_t to) const
constexpr bool empty() const
constexpr size_t size() const
constexpr T * begin() const
constexpr T * data() const
constexpr T * end() const
void Reset(Tagged< ConsString > cons_string, int offset=0)
void PushRight(Tagged< ConsString > string)
static int OffsetForDepth(int depth)
void AdjustMaximumDepth()
Tagged< String > Next(int *offset_out)
void PushLeft(Tagged< ConsString > string)
V8_INLINE bool IsFlat() const
void set_first(Tagged< String > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
Tagged< String > first() const
Tagged< Object > unchecked_second() const
void set_second(Tagged< String > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
Tagged< Object > unchecked_first() const
Tagged< String > second() const
Resource * mutable_resource()
const Resource * resource() const
const uint8_t * GetChars() const
void update_data_cache(Isolate *isolate)
void SetResource(Isolate *isolate, const Resource *buffer)
uint8_t Get(uint32_t index, const SharedStringAccessGuardIfNeeded &access_guard) const
void set_resource(Isolate *isolate, const Resource *buffer)
void VisitExternalPointers(ObjectVisitor *visitor)
void SetResourceRefForSerialization(uint32_t ref)
void DisposeResource(Isolate *isolate)
void InitExternalPointerFields(Isolate *isolate)
uint32_t GetResourceRefForDeserialization()
Address resource_as_address() const
void set_address_as_resource(Isolate *isolate, Address address)
void SetResource(Isolate *isolate, const Resource *buffer)
uint16_t Get(uint32_t index, const SharedStringAccessGuardIfNeeded &access_guard) const
Resource * mutable_resource()
const uint16_t * GetChars() const
const uint16_t * ExternalTwoByteStringGetData(uint32_t start)
void set_resource(Isolate *isolate, const Resource *buffer)
void update_data_cache(Isolate *isolate)
const Resource * resource() const
base::uc32 Get(uint32_t index) const
static V8_INLINE bool InYoungGeneration(Tagged< Object > object)
static V8_INLINE bool InWritableSharedSpace(Tagged< HeapObject > object)
static V8_INLINE bool InAnySharedSpace(Tagged< HeapObject > object)
Tagged< Map > map() const
static const int kStringEncodingMask
static const int kExternalTwoByteRepresentationTag
static const int kExternalOneByteRepresentationTag
static const int kStringRepresentationAndEncodingMask
bool is_main_thread() const
base::Mutex * internalized_string_access()
V8_INLINE DirectHandle< T > ToHandleChecked() const
static bool IsIntegerIndex(uint32_t raw_hash_field)
static bool ContainsCachedArrayIndex(uint32_t hash)
uint32_t raw_hash_field() const
static bool IsHashFieldComputed(uint32_t raw_hash_field)
virtual void VisitExternalPointer(Tagged< HeapObject > host, ExternalPointerSlot slot)
static int SizeOf(Tagged< Map > map, Tagged< HeapObject > raw_object)
V8_INLINE uint8_t * GetChars(const DisallowGarbageCollection &no_gc)
Address GetCharsAddress() const
static V8_INLINE constexpr int32_t SizeFor(int32_t length)
int AllocatedSize() const
uint8_t Get(uint32_t index) const
static V8_INLINE constexpr int32_t DataSizeFor(int32_t length)
void SeqOneByteStringSetChars(uint32_t index, const uint8_t *string, uint32_t length)
void SeqOneByteStringSet(uint32_t index, uint16_t value)
void clear_padding_destructively(uint32_t length)
static bool IsCompatibleMap(Tagged< Map > map, ReadOnlyRoots roots)
void PrepareForInsertion(Isolate *isolate)
bool IsMatch(Isolate *isolate, Tagged< String > string)
DirectHandle< typename CharTraits< Char >::String > string_
typename SeqString::Char Char
DirectHandle< String > GetHandleForInsertion(Isolate *isolate)
SeqSubStringKey(Isolate *isolate, DirectHandle< SeqString > string, int from, int len, bool convert=false)
DirectHandle< String > internalized_string_
static int SizeOf(Tagged< Map > map, Tagged< HeapObject > raw_object)
uint16_t Get(uint32_t index, const SharedStringAccessGuardIfNeeded &access_guard) const
static bool IsCompatibleMap(Tagged< Map > map, ReadOnlyRoots roots)
Address GetCharsAddress() const
int AllocatedSize() const
void clear_padding_destructively(uint32_t length)
static V8_INLINE constexpr int32_t DataSizeFor(int32_t length)
void SeqTwoByteStringSet(uint32_t index, uint16_t value)
static V8_INLINE constexpr int32_t SizeFor(int32_t length)
base::uc16 * GetChars(const DisallowGarbageCollection &no_gc)
DirectHandle< String > internalized_string_
void PrepareForInsertion(IsolateT *isolate)
SequentialStringKey(int raw_hash_field, base::Vector< const Char > chars, bool convert=false)
bool IsMatch(IsolateT *isolate, Tagged< String > s)
base::Vector< const Char > chars_
SequentialStringKey(base::Vector< const Char > chars, uint64_t seed, bool convert=false)
DirectHandle< String > GetHandleForInsertion(Isolate *isolate)
static bool IsNeeded(LocalIsolate *local_isolate)
std::optional< base::MutexGuard > mutex_guard
SharedStringAccessGuardIfNeeded(Isolate *isolate)
static bool IsNeeded(Tagged< String > str, bool check_local_heap=true)
SharedStringAccessGuardIfNeeded(Tagged< String > str, LocalIsolate *local_isolate)
static bool IsNeeded(Tagged< String > str, LocalIsolate *local_isolate)
SharedStringAccessGuardIfNeeded(Tagged< String > str)
SharedStringAccessGuardIfNeeded(LocalIsolate *local_isolate)
constexpr SharedStringAccessGuardIfNeeded(SharedStringAccessGuardIfNeeded &&) V8_NOEXCEPT
constexpr SharedStringAccessGuardIfNeeded()=default
static SharedStringAccessGuardIfNeeded NotNeeded()
static Isolate * GetIsolateIfNeeded(Tagged< String > str)
Tagged< String > parent() const
void set_parent(Tagged< String > parent, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
void set_offset(int32_t offset)
static constexpr Tagged< Smi > FromInt(int value)
StringCharacterStream(const StringCharacterStream &)=delete
void Reset(Tagged< String > string, int offset=0)
const uint16_t * buffer16_
StringCharacterStream(Tagged< String > string, int offset=0)
void VisitOneByteString(const uint8_t *chars, int length)
SharedStringAccessGuardIfNeeded access_guard_
void VisitTwoByteString(const uint16_t *chars, int length)
StringCharacterStream & operator=(const StringCharacterStream &)=delete
static uint32_t HashSequentialString(const char_t *chars, uint32_t length, uint64_t seed)
V8_INLINE bool IsShared() const
V8_INLINE uint32_t encoding_tag() const
V8_INLINE bool IsThin() const
V8_INLINE bool IsExternalOneByte() const
V8_INLINE bool IsInternalized() const
V8_INLINE StringShape(const Tagged< String > s)
V8_INLINE bool IsIndirect() const
V8_INLINE uint32_t representation_encoding_and_shared_tag() const
V8_INLINE bool IsCons() const
V8_INLINE StringRepresentationTag representation_tag() const
V8_INLINE bool IsSliced() const
V8_INLINE bool IsExternalTwoByte() const
V8_INLINE bool IsExternal() const
V8_INLINE bool IsSequentialOneByte() const
V8_INLINE uint32_t representation_and_encoding_tag() const
V8_INLINE bool IsDirect() const
V8_INLINE bool IsSequentialTwoByte() const
V8_INLINE bool IsUncachedExternal() const
V8_INLINE bool IsSequential() const
uint32_t raw_hash_field() const
void set_raw_hash_field(uint32_t raw_hash_field)
base::Vector< const uint8_t > ToOneByteVector() const
bool UsesSameString(const FlatContent &other) const
base::Vector< const base::uc16 > ToUC16Vector() const
FlatContent(const uint8_t *start, uint32_t length, const DisallowGarbageCollection &no_gc)
base::uc16 Get(uint32_t i) const
static V8_NOINLINE bool IsConsStringEqualToImpl(Tagged< ConsString > string, base::Vector< const Char > str, const SharedStringAccessGuardIfNeeded &access_guard)
void set_length(uint32_t hash)
static V8_INLINE HandleType< String > Flatten(Isolate *isolate, HandleType< T > string, AllocationType allocation=AllocationType::kYoung)
V8_INLINE auto DispatchToSpecificType(TDispatcher &&dispatcher) const -> std::common_type_t< decltype(dispatcher(Tagged< SeqOneByteString >{})), decltype(dispatcher(Tagged< SeqTwoByteString >{})), decltype(dispatcher(Tagged< ExternalOneByteString >{})), decltype(dispatcher(Tagged< ExternalTwoByteString >{})), decltype(dispatcher(Tagged< ThinString >{})), decltype(dispatcher(Tagged< ConsString >{})), decltype(dispatcher(Tagged< SlicedString >{}))>
V8_INLINE uint16_t GetImpl(uint32_t index, const SharedStringAccessGuardIfNeeded &access_guard) const
bool IsTwoByteRepresentation() const
V8_EXPORT_PRIVATE static V8_INLINE std::optional< FlatContent > TryGetFlatContentFromDirectString(const DisallowGarbageCollection &no_gc, Tagged< String > string, uint32_t offset, uint32_t length, const SharedStringAccessGuardIfNeeded &)
static auto DispatchToSpecificTypeWithoutCast(InstanceType instance_type, TArgs &&... args)
static const int32_t kMaxOneByteCharCode
V8_INLINE base::Vector< const Char > GetCharVector(const DisallowGarbageCollection &no_gc)
V8_EXPORT_PRIVATE bool SlowAsArrayIndex(uint32_t *index)
static bool IsInPlaceInternalizable(Tagged< String > string)
static HandleType< String > Share(Isolate *isolate, HandleType< T > string)
static bool IsOneByteRepresentationUnderneath(Tagged< String > string)
V8_EXPORT_PRIVATE bool IsOneByteEqualTo(base::Vector< const char > str)
V8_EXPORT_PRIVATE FlatContent SlowGetFlatContent(const DisallowGarbageCollection &no_gc, const SharedStringAccessGuardIfNeeded &)
V8_EXPORT_PRIVATE bool SlowAsIntegerIndex(size_t *index)
static size_t Utf8Length(Isolate *isolate, DirectHandle< String > string)
V8_EXPORT_PRIVATE bool SlowEquals(Tagged< String > other) const
V8_INLINE uint16_t Get(uint32_t index) const
bool IsOneByteRepresentation() const
void Set(uint32_t index, uint16_t value)
static V8_EXPORT_PRIVATE HandleType< String > SlowFlatten(Isolate *isolate, HandleType< ConsString > cons, AllocationType allocation)
V8_INLINE bool IsEqualToImpl(base::Vector< const Char > str, const SharedStringAccessGuardIfNeeded &access_guard) const
bool IsEqualTo(base::Vector< const Char > str, Isolate *isolate) const
bool AsArrayIndex(uint32_t *index)
static bool IsWellFormedUnicode(Isolate *isolate, DirectHandle< String > string)
Tagged< String > GetUnderlying() const
bool Equals(Tagged< String > other) const
const Char * GetDirectStringChars(const DisallowGarbageCollection &no_gc) const
static bool IsInPlaceInternalizableExcludingExternal(InstanceType instance_type)
V8_EXPORT_PRIVATE V8_INLINE FlatContent GetFlatContent(const DisallowGarbageCollection &no_gc)
static Tagged< ConsString > VisitFlat(Visitor *visitor, Tagged< String > string, int offset=0)
bool AsIntegerIndex(size_t *index)
iterator(Tagged< String > from, int offset, const DisallowGarbageCollection &no_gc)
iterator(const iterator &other)=default
bool operator!=(const iterator &other) const
String::FlatContent content_
bool operator==(const iterator &other) const
std::forward_iterator_tag iterator_category
const DisallowGarbageCollection & no_gc_
SubStringRange(Tagged< String > string, const DisallowGarbageCollection &no_gc, int first=0, int length=-1)
V8_INLINE constexpr bool is_null() const
Tagged< String > actual() const
Tagged< HeapObject > unchecked_actual() const
void set_actual(Tagged< String > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
static ThreadId Current()
#define OBJECT_POINTER_ALIGN(value)
DirectHandle< String > string_
const v8::base::TimeTicks end_
enum v8::internal::@1270::DeoptimizableCodeIterator::@67 state_
base::Vector< const DirectHandle< Object > > args
DisallowGarbageCollection no_gc_
Handle< FixedArray > frames_
ZoneVector< RpoNumber > & result
V8_INLINE constexpr bool IsSeqString(InstanceType instance_type)
V8_INLINE constexpr bool IsThinString(InstanceType instance_type)
V8_INLINE constexpr bool IsConsString(InstanceType instance_type)
V8_INLINE constexpr bool IsExternalString(InstanceType instance_type)
V8_INLINE constexpr bool IsOneByteString(InstanceType instance_type)
V8_INLINE constexpr bool IsSlicedString(InstanceType instance_type)
V8_INLINE constexpr bool IsTwoByteString(InstanceType instance_type)
const uint32_t kSharedStringTag
const uint32_t kStringEncodingMask
constexpr int kTaggedSize
constexpr intptr_t kObjectAlignment
const uint32_t kTwoByteStringTag
constexpr uint32_t kStringRepresentationAndEncodingMask
constexpr uint32_t kSeqOneByteStringTag
const uint32_t kUncachedExternalStringTag
Tagged(T object) -> Tagged< T >
static constexpr bool kTaggedCanConvertToRawObjects
const uint32_t kUncachedExternalStringMask
V8_INLINE bool GetIsolateFromHeapObject(Tagged< HeapObject > object, Isolate **isolate)
constexpr ExternalPointer_t kNullExternalPointer
const uint32_t kNotInternalizedTag
const uint32_t kStringTag
const uint32_t kOneByteStringTag
V8_INLINE IsolateForSandbox GetIsolateForSandbox(Tagged< HeapObject >)
Handle< To > UncheckedCast(Handle< From > value)
bool CompareCharsEqual(const lchar *lhs, const rchar *rhs, size_t chars)
Address ExternalPointer_t
constexpr uint32_t kExternalTwoByteStringTag
constexpr uint32_t kStringRepresentationEncodingAndSharedMask
const uint32_t kStringRepresentationMask
@ SHARED_SEQ_ONE_BYTE_STRING_TYPE
@ SEQ_ONE_BYTE_STRING_TYPE
@ SHARED_SEQ_TWO_BYTE_STRING_TYPE
@ SHARED_EXTERNAL_TWO_BYTE_STRING_TYPE
@ EXTERNAL_TWO_BYTE_STRING_TYPE
@ SEQ_TWO_BYTE_STRING_TYPE
@ SHARED_EXTERNAL_ONE_BYTE_STRING_TYPE
@ EXTERNAL_ONE_BYTE_STRING_TYPE
void CopyChars(DstType *dst, const SrcType *src, size_t count) V8_NONNULL(1
const uint32_t kIsIndirectStringTag
V8_EXPORT_PRIVATE FlagValues v8_flags
const uint32_t kInternalizedTag
const uint32_t kSharedStringMask
const uint32_t kIsNotInternalizedMask
constexpr uint32_t kExternalOneByteStringTag
uint64_t HashSeed(Isolate *isolate)
static constexpr Address kNullAddress
const uint32_t kIsNotStringMask
constexpr uint32_t kSeqTwoByteStringTag
const uint32_t kIsIndirectStringMask
template const char * string
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
static constexpr AcquireLoadTag kAcquireLoad
BytecodeSequenceNode * parent_
#define DCHECK_LE(v1, v2)
#define DCHECK_IMPLIES(v1, v2)
#define DCHECK_NE(v1, v2)
#define DCHECK_GE(v1, v2)
#define DCHECK(condition)
#define DCHECK_LT(v1, v2)
#define DCHECK_EQ(v1, v2)
#define DCHECK_GT(v1, v2)
#define V8_EXPORT_PRIVATE
#define V8_LIKELY(condition)
#define V8_UNLIKELY(condition)
#define V8_INLINE_STATEMENT