#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 10662 of file object.h.
◆ CharAt() [1/2]
static uint16_t dart::TwoByteString::CharAt |
( |
const String & |
str, |
|
|
intptr_t |
index |
|
) |
| |
|
inlinestatic |
Definition at line 10664 of file object.h.
10664 {
10665 ASSERT(str.IsTwoByteString());
10667 index);
10668 }
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 10670 of file object.h.
10670 {
10672 return str->untag()->data()[index];
10673 }
static intptr_t LengthOf(StringPtr obj)
◆ Concat()
Definition at line 24640 of file object.cc.
24642 {
24643 intptr_t len1 = str1.Length();
24644 intptr_t len2 = str2.Length();
24645 intptr_t
len = len1 + len2;
24649 return TwoByteString::raw(
result);
24650}
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 24652 of file object.cc.
24656 {
24657 ASSERT(!strings.IsNull());
24659 ASSERT(end <= strings.Length());
24663 for (intptr_t
i = start;
i <
end;
i++) {
24664 str ^= strings.At(
i);
24665 const intptr_t str_len = str.
Length();
24669 }
24670 return TwoByteString::raw(
result);
24671}
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 10695 of file object.h.
10695 {
10697 }
static int8_t data[kExtLength]
#define OFFSET_OF_RETURNED_VALUE(type, accessor)
◆ EscapeSpecialCharacters()
TwoByteStringPtr dart::TwoByteString::EscapeSpecialCharacters |
( |
const String & |
str | ) |
|
|
static |
Definition at line 24530 of file object.cc.
24530 {
24531 intptr_t
len = str.Length();
24533 intptr_t num_escapes = 0;
24534 for (intptr_t
i = 0;
i <
len;
i++) {
24536 }
24539 intptr_t index = 0;
24540 for (intptr_t
i = 0;
i <
len;
i++) {
24541 uint16_t ch =
CharAt(str,
i);
24545 index += 2;
24551 index += 4;
24552 } else {
24554 index += 1;
24555 }
24556 }
24557 return TwoByteString::raw(dststr);
24558 }
24560}
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 10704 of file object.h.
10704 {
10705 ASSERT(
sizeof(UntaggedTwoByteString) ==
10707 return 0;
10708 }
◆ InstanceSize() [2/2]
static intptr_t dart::TwoByteString::InstanceSize |
( |
intptr_t |
len | ) |
|
|
inlinestatic |
Definition at line 10709 of file object.h.
10709 {
10713 }
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 24619 of file object.cc.
24619 {
24620 intptr_t
len = str.Length();
24623 return TwoByteString::raw(
result);
24624}
◆ New() [2/5]
Definition at line 24626 of file object.cc.
24629 {
24631 if (other_len > 0) {
24632 NoSafepointScope no_safepoint;
24633 memmove(TwoByteString::DataStart(
result),
24634 other_typed_data.DataAddr(other_start_index),
24635 other_len * sizeof(uint16_t));
24636 }
24637 return TwoByteString::raw(
result);
24638}
◆ New() [3/5]
TwoByteStringPtr dart::TwoByteString::New |
( |
const uint16_t * |
characters, |
|
|
intptr_t |
len, |
|
|
Heap::Space |
space |
|
) |
| |
|
static |
Definition at line 24582 of file object.cc.
24584 {
24587 {
24588 NoSafepointScope no_safepoint;
24589 memmove(
reinterpret_cast<void*
>(DataStart(
result)),
24590 reinterpret_cast<const void*>(utf16_array), (array_len * 2));
24591 }
24592 return TwoByteString::raw(
result);
24593}
◆ New() [4/5]
TwoByteStringPtr dart::TwoByteString::New |
( |
intptr_t |
len, |
|
|
Heap::Space |
space |
|
) |
| |
|
static |
Definition at line 24562 of file object.cc.
24562 {
24564 nullptr);
24566
24567 FATAL(
"Fatal error in TwoByteString::New: invalid len %" Pd "\n",
len);
24568 }
24569 auto s = Object::Allocate<TwoByteString>(space,
len);
24570 NoSafepointScope no_safepoint;
24572#if !defined(HASH_IN_OBJECT_HEADER)
24574#endif
24576 ASSERT(size <= s->untag()->HeapSize());
24578 s->untag()->HeapSize() -
size);
24580}
static IsolateGroup * Current()
static SmiPtr New(intptr_t value)
static uword ToAddr(const UntaggedObject *raw_obj)
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 24595 of file object.cc.
24598 {
24599 ASSERT((array_len > 0) && (utf16_len >= array_len));
24601 {
24602 NoSafepointScope no_safepoint;
24603 intptr_t j = 0;
24604 for (intptr_t
i = 0;
i < array_len; ++
i) {
24606 ASSERT(j < (utf16_len - 1));
24608 j += 2;
24609 } else {
24611 *CharAddr(
result, j) = utf32_array[
i];
24612 j += 1;
24613 }
24614 }
24615 }
24616 return TwoByteString::raw(
result);
24617}
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 10675 of file object.h.
10675 {
10676 NoSafepointScope no_safepoint;
10677 *CharAddr(str, index) = ch;
10678 }
◆ Transform()
TwoByteStringPtr dart::TwoByteString::Transform |
( |
int32_t(*)(int32_t ch) |
mapping, |
|
|
const String & |
str, |
|
|
Heap::Space |
space |
|
) |
| |
|
static |
Definition at line 24673 of file object.cc.
24675 {
24677 intptr_t
len = str.Length();
24679 String::CodePointIterator it(str);
24681 NoSafepointScope no_safepoint;
24682 while (it.Next()) {
24683 int32_t
src = it.Current();
24684 int32_t
dst = mapping(
src);
24689 } else {
24692 }
24694 }
24695 return TwoByteString::raw(
result);
24696}
static intptr_t Length(int32_t ch)
◆ UnroundedSize() [1/2]
static intptr_t dart::TwoByteString::UnroundedSize |
( |
intptr_t |
len | ) |
|
|
inlinestatic |
Definition at line 10701 of file object.h.
10701 {
10703 }
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 10685 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