Definition at line 2567 of file message_snapshot.cc.
◆ TwoByteStringMessageSerializationCluster()
dart::TwoByteStringMessageSerializationCluster::TwoByteStringMessageSerializationCluster |
( |
Zone * |
zone, |
|
|
bool |
is_canonical |
|
) |
| |
|
inlineexplicit |
Definition at line 2570 of file message_snapshot.cc.
2574 kTwoByteStringCid,
2576 objects_(zone, 0) {}
bool is_canonical() const
MessageSerializationCluster(const char *name, MessagePhase phase, intptr_t cid, bool is_canonical=false)
◆ ~TwoByteStringMessageSerializationCluster()
dart::TwoByteStringMessageSerializationCluster::~TwoByteStringMessageSerializationCluster |
( |
| ) |
|
|
inline |
◆ Trace()
◆ TraceApi()
◆ WriteNodes()
void dart::TwoByteStringMessageSerializationCluster::WriteNodes |
( |
MessageSerializer * |
s | ) |
|
|
inlinevirtual |
Implements dart::MessageSerializationCluster.
Definition at line 2584 of file message_snapshot.cc.
2584 {
2585 const intptr_t
count = objects_.length();
2587 for (intptr_t
i = 0;
i <
count;
i++) {
2588 String* str = objects_[
i];
2590 intptr_t
length = str->Length();
2592 NoSafepointScope no_safepoint;
2593 uint16_t* utf16 = TwoByteString::DataStart(*str);
2594 s->WriteBytes(
reinterpret_cast<const uint8_t*
>(utf16),
2595 length *
sizeof(uint16_t));
2596 }
2597 }
◆ WriteNodesApi()
Reimplemented from dart::MessageSerializationCluster.
Definition at line 2603 of file message_snapshot.cc.
2603 {
2604 intptr_t
count = objects_.length();
2606 for (intptr_t
i = 0;
i <
count;
i++) {
2609
2610 const uint8_t* utf8_str =
2615
2616 uint16_t* utf16_str = reinterpret_cast<uint16_t*>(
2618 bool success =
2621 s->WriteUnsigned(utf16_len);
2622 s->WriteBytes(
reinterpret_cast<const uint8_t*
>(utf16_str),
2623 utf16_len * sizeof(uint16_t));
2624 ::free(utf16_str);
2625 }
2626 }
static intptr_t CodeUnitCount(const uint8_t *utf8_array, intptr_t array_len, Type *type)
static bool DecodeToUTF16(const uint8_t *utf8_array, intptr_t array_len, uint16_t *dst, intptr_t len)
void * malloc(size_t size)
union _Dart_CObject::@86 value
The documentation for this class was generated from the following file: