#include <object.h>
|
static uint16_t | CharAt (const String &str, intptr_t index) |
|
static uint16_t | CharAt (TwoByteStringPtr str, intptr_t index) |
|
static void | SetCharAt (const String &str, intptr_t index, uint16_t ch) |
|
static TwoByteStringPtr | EscapeSpecialCharacters (const String &str) |
|
static intptr_t | data_offset () |
|
static intptr_t | UnroundedSize (TwoByteStringPtr str) |
|
static intptr_t | UnroundedSize (intptr_t len) |
|
static intptr_t | InstanceSize () |
|
static intptr_t | InstanceSize (intptr_t len) |
|
static TwoByteStringPtr | New (intptr_t len, Heap::Space space) |
|
static TwoByteStringPtr | New (const uint16_t *characters, intptr_t len, Heap::Space space) |
|
static TwoByteStringPtr | New (intptr_t utf16_len, const int32_t *characters, intptr_t len, Heap::Space space) |
|
static TwoByteStringPtr | New (const String &str, Heap::Space space) |
|
static TwoByteStringPtr | New (const TypedDataBase &other_typed_data, intptr_t other_start_index, intptr_t other_len, Heap::Space space=Heap::kNew) |
|
static TwoByteStringPtr | Concat (const String &str1, const String &str2, Heap::Space space) |
|
static TwoByteStringPtr | ConcatAll (const Array &strings, intptr_t start, intptr_t end, intptr_t len, Heap::Space space) |
|
static TwoByteStringPtr | Transform (int32_t(*mapping)(int32_t ch), const String &str, Heap::Space space) |
|
static TwoByteStringPtr | null () |
|
Definition at line 10641 of file object.h.
◆ CharAt() [1/2]
static uint16_t dart::TwoByteString::CharAt |
( |
const String & |
str, |
|
|
intptr_t |
index |
|
) |
| |
|
inlinestatic |
Definition at line 10643 of file object.h.
10643 {
10644 ASSERT(str.IsTwoByteString());
10646 index);
10647 }
static uint16_t CharAt(const String &str, intptr_t index)
◆ CharAt() [2/2]
static uint16_t dart::TwoByteString::CharAt |
( |
TwoByteStringPtr |
str, |
|
|
intptr_t |
index |
|
) |
| |
|
inlinestatic |
Definition at line 10649 of file object.h.
10649 {
10651 return str->untag()->data()[index];
10652 }
static intptr_t LengthOf(StringPtr obj)
◆ Concat()
Definition at line 24719 of file object.cc.
24721 {
24722 intptr_t len1 = str1.Length();
24723 intptr_t len2 = str2.Length();
24724 intptr_t
len = len1 + len2;
24728 return TwoByteString::raw(
result);
24729}
static void Copy(const String &dst, intptr_t dst_offset, const uint8_t *characters, intptr_t len)
static TwoByteStringPtr New(intptr_t len, Heap::Space space)
◆ ConcatAll()
TwoByteStringPtr dart::TwoByteString::ConcatAll |
( |
const Array & |
strings, |
|
|
intptr_t |
start, |
|
|
intptr_t |
end, |
|
|
intptr_t |
len, |
|
|
Heap::Space |
space |
|
) |
| |
|
static |
Definition at line 24731 of file object.cc.
24735 {
24736 ASSERT(!strings.IsNull());
24742 for (intptr_t i =
start; i <
end; i++) {
24743 str ^= strings.At(i);
24744 const intptr_t str_len = str.
Length();
24748 }
24749 return TwoByteString::raw(
result);
24750}
static constexpr intptr_t kMaxElements
static float Length(float x, float y)
◆ data_offset()
static intptr_t dart::TwoByteString::data_offset |
( |
| ) |
|
|
inlinestatic |
Definition at line 10674 of file object.h.
10674 {
10676 }
static int8_t data[kExtLength]
#define OFFSET_OF_RETURNED_VALUE(type, accessor)
◆ EscapeSpecialCharacters()
TwoByteStringPtr dart::TwoByteString::EscapeSpecialCharacters |
( |
const String & |
str | ) |
|
|
static |
Definition at line 24609 of file object.cc.
24609 {
24610 intptr_t
len = str.Length();
24611 if (len > 0) {
24612 intptr_t num_escapes = 0;
24613 for (intptr_t i = 0; i <
len; i++) {
24615 }
24618 intptr_t index = 0;
24619 for (intptr_t i = 0; i <
len; i++) {
24620 uint16_t ch =
CharAt(str, i);
24624 index += 2;
24630 index += 4;
24631 } else {
24633 index += 1;
24634 }
24635 }
24636 return TwoByteString::raw(dststr);
24637 }
24639}
static void SetCharAt(const String &str, intptr_t index, uint16_t ch)
static type SpecialCharacter(type value)
static int32_t GetHexCharacter(int32_t c)
static int32_t EscapeOverhead(int32_t c)
static bool IsSpecialCharacter(type value)
static bool IsAsciiNonprintable(int32_t c)
◆ InstanceSize() [1/2]
static intptr_t dart::TwoByteString::InstanceSize |
( |
| ) |
|
|
inlinestatic |
Definition at line 10683 of file object.h.
10683 {
10684 ASSERT(
sizeof(UntaggedTwoByteString) ==
10686 return 0;
10687 }
◆ InstanceSize() [2/2]
static intptr_t dart::TwoByteString::InstanceSize |
( |
intptr_t |
len | ) |
|
|
inlinestatic |
Definition at line 10688 of file object.h.
10688 {
10692 }
static constexpr intptr_t RoundedAllocationSize(intptr_t size)
static constexpr intptr_t kSizeofRawString
static intptr_t UnroundedSize(TwoByteStringPtr str)
◆ New() [1/5]
Definition at line 24698 of file object.cc.
24698 {
24699 intptr_t
len = str.Length();
24702 return TwoByteString::raw(
result);
24703}
◆ New() [2/5]
Definition at line 24705 of file object.cc.
24708 {
24710 if (other_len > 0) {
24711 NoSafepointScope no_safepoint;
24712 memmove(TwoByteString::DataStart(
result),
24713 other_typed_data.DataAddr(other_start_index),
24714 other_len * sizeof(uint16_t));
24715 }
24716 return TwoByteString::raw(
result);
24717}
◆ New() [3/5]
TwoByteStringPtr dart::TwoByteString::New |
( |
const uint16_t * |
characters, |
|
|
intptr_t |
len, |
|
|
Heap::Space |
space |
|
) |
| |
|
static |
Definition at line 24661 of file object.cc.
24663 {
24666 {
24667 NoSafepointScope no_safepoint;
24668 memmove(
reinterpret_cast<void*
>(DataStart(
result)),
24669 reinterpret_cast<const void*>(utf16_array), (array_len * 2));
24670 }
24671 return TwoByteString::raw(
result);
24672}
◆ New() [4/5]
TwoByteStringPtr dart::TwoByteString::New |
( |
intptr_t |
len, |
|
|
Heap::Space |
space |
|
) |
| |
|
static |
Definition at line 24641 of file object.cc.
24641 {
24643 nullptr);
24645
24646 FATAL(
"Fatal error in TwoByteString::New: invalid len %" Pd "\n", len);
24647 }
24648 auto s = Object::Allocate<TwoByteString>(space, len);
24649 NoSafepointScope no_safepoint;
24651#if !defined(HASH_IN_OBJECT_HEADER)
24653#endif
24657 s->untag()->HeapSize() - size);
24659}
static IsolateGroup * Current()
static SmiPtr New(intptr_t value)
static uword ToAddr(const UntaggedObject *raw_obj)
raw_obj untag() -> num_entries()) VARIABLE_COMPRESSED_VISITOR(Array, Smi::Value(raw_obj->untag() ->length())) VARIABLE_COMPRESSED_VISITOR(TypedData, TypedData::ElementSizeInBytes(raw_obj->GetClassId()) *Smi::Value(raw_obj->untag() ->length())) VARIABLE_COMPRESSED_VISITOR(Record, RecordShape(raw_obj->untag() ->shape()).num_fields()) VARIABLE_NULL_VISITOR(CompressedStackMaps, CompressedStackMaps::PayloadSizeOf(raw_obj)) VARIABLE_NULL_VISITOR(OneByteString, Smi::Value(raw_obj->untag() ->length())) VARIABLE_NULL_VISITOR(TwoByteString, Smi::Value(raw_obj->untag() ->length())) intptr_t UntaggedField::VisitFieldPointers(FieldPtr raw_obj, ObjectPointerVisitor *visitor)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
◆ New() [5/5]
TwoByteStringPtr dart::TwoByteString::New |
( |
intptr_t |
utf16_len, |
|
|
const int32_t * |
characters, |
|
|
intptr_t |
len, |
|
|
Heap::Space |
space |
|
) |
| |
|
static |
Definition at line 24674 of file object.cc.
24677 {
24678 ASSERT((array_len > 0) && (utf16_len >= array_len));
24680 {
24681 NoSafepointScope no_safepoint;
24682 intptr_t j = 0;
24683 for (intptr_t i = 0; i < array_len; ++i) {
24685 ASSERT(j < (utf16_len - 1));
24687 j += 2;
24688 } else {
24690 *CharAddr(
result, j) = utf32_array[i];
24691 j += 1;
24692 }
24693 }
24694 }
24695 return TwoByteString::raw(
result);
24696}
static void Encode(int32_t codepoint, uint16_t *dst)
static bool IsSupplementary(int32_t code_point)
◆ null()
static TwoByteStringPtr dart::TwoByteString::null |
( |
| ) |
|
|
inlinestatic |
◆ SetCharAt()
static void dart::TwoByteString::SetCharAt |
( |
const String & |
str, |
|
|
intptr_t |
index, |
|
|
uint16_t |
ch |
|
) |
| |
|
inlinestatic |
Definition at line 10654 of file object.h.
10654 {
10655 NoSafepointScope no_safepoint;
10656 *CharAddr(str, index) = ch;
10657 }
◆ Transform()
TwoByteStringPtr dart::TwoByteString::Transform |
( |
int32_t(*)(int32_t ch) |
mapping, |
|
|
const String & |
str, |
|
|
Heap::Space |
space |
|
) |
| |
|
static |
Definition at line 24752 of file object.cc.
24754 {
24756 intptr_t
len = str.Length();
24758 String::CodePointIterator it(str);
24759 intptr_t i = 0;
24760 NoSafepointScope no_safepoint;
24761 while (it.Next()) {
24762 int32_t
src = it.Current();
24763 int32_t
dst = mapping(src);
24764 ASSERT(dst >= 0 && dst <= 0x10FFFF);
24766 if (len == 1) {
24768 } else {
24771 }
24773 }
24774 return TwoByteString::raw(
result);
24775}
static intptr_t Length(int32_t ch)
◆ UnroundedSize() [1/2]
static intptr_t dart::TwoByteString::UnroundedSize |
( |
intptr_t |
len | ) |
|
|
inlinestatic |
Definition at line 10680 of file object.h.
10680 {
10682 }
static constexpr intptr_t kBytesPerElement
◆ UnroundedSize() [2/2]
static intptr_t dart::TwoByteString::UnroundedSize |
( |
TwoByteStringPtr |
str | ) |
|
|
inlinestatic |
◆ Class
◆ FlowGraphSerializer
◆ ImageWriter
◆ JSONWriter
◆ String
◆ StringHasher
◆ Symbols
◆ TwoByteStringMessageSerializationCluster
◆ kBytesPerElement
constexpr intptr_t dart::TwoByteString::kBytesPerElement = 2 |
|
staticconstexpr |
◆ kClassId
const ClassId dart::TwoByteString::kClassId = kTwoByteStringCid |
|
static |
◆ kMaxElements
constexpr intptr_t dart::TwoByteString::kMaxElements = String::kMaxElements |
|
staticconstexpr |
◆ kMaxNewSpaceElements
constexpr intptr_t dart::TwoByteString::kMaxNewSpaceElements |
|
staticconstexpr |
Initial value:=
static constexpr intptr_t kNewAllocatableSize
Definition at line 10664 of file object.h.
The documentation for this class was generated from the following files:
- third_party/dart-lang/sdk/runtime/vm/object.h
- third_party/dart-lang/sdk/runtime/vm/object.cc