#include <kernel_binary.h>
Definition at line 280 of file kernel_binary.h.
◆ Reader()
Definition at line 282 of file kernel_binary.h.
284 Init();
285 }
static Thread * Current()
const TypedDataBase * typed_data()
◆ BufferAt()
const uint8_t * dart::kernel::Reader::BufferAt |
( |
intptr_t |
offset | ) |
|
|
inline |
◆ ConvertNullability()
Definition at line 427 of file kernel_binary.h.
427 {
428 switch (kernel_nullability) {
435 FATAL(
"Legacy nullability is not supported.");
436 }
438 }
◆ EnsureEnd()
void dart::kernel::Reader::EnsureEnd |
( |
| ) |
|
|
inline |
Definition at line 450 of file kernel_binary.h.
450 {
451 if (offset_ != size_) {
453 "Reading Kernel file: Expected to be at EOF "
454 "(offset: %" Pd ", size: %" Pd ")",
455 offset_, size_);
456 }
457 }
◆ max_position()
◆ min_position()
◆ offset()
intptr_t dart::kernel::Reader::offset |
( |
| ) |
const |
|
inline |
◆ PeekByte()
uint8_t dart::kernel::Reader::PeekByte |
( |
| ) |
|
|
inline |
◆ PeekTag()
Tag dart::kernel::Reader::PeekTag |
( |
uint8_t * |
payload = nullptr | ) |
|
|
inline |
Definition at line 413 of file kernel_binary.h.
413 {
415 bool has_payload =
417 if (has_payload) {
418 if (payload != nullptr) {
420 }
422 } else {
423 return static_cast<Tag>(byte);
424 }
425 }
static constexpr intptr_t kSpecializedPayloadMask
static constexpr intptr_t kSpecializedTagHighBits
static constexpr intptr_t kSpecializedTagMask
◆ ReadBool()
bool dart::kernel::Reader::ReadBool |
( |
| ) |
|
|
inline |
◆ ReadByte()
uint8_t dart::kernel::Reader::ReadByte |
( |
| ) |
|
|
inline |
◆ ReadBytes()
void dart::kernel::Reader::ReadBytes |
( |
uint8_t * |
buffer, |
|
|
uint8_t |
size |
|
) |
| |
|
inline |
Definition at line 387 of file kernel_binary.h.
387 {
388 for (
int i = 0;
i <
size;
i++) {
390 }
391 }
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
◆ ReadCanonicalNameReference()
NameIndex dart::kernel::Reader::ReadCanonicalNameReference |
( |
| ) |
|
|
inline |
◆ ReadDouble()
double dart::kernel::Reader::ReadDouble |
( |
| ) |
|
|
inline |
Definition at line 319 of file kernel_binary.h.
319 {
320 ASSERT((size_ >= 8) && (offset_ >= 0) && (offset_ <= size_ - 8));
322 LoadUnaligned(
reinterpret_cast<const double*
>(&raw_buffer_[offset_]));
323 offset_ += 8;
325 }
static T LoadUnaligned(const T *ptr)
◆ ReadFlags()
uint8_t dart::kernel::Reader::ReadFlags |
( |
| ) |
|
|
inline |
◆ ReadFromIndex()
uint32_t dart::kernel::Reader::ReadFromIndex |
( |
intptr_t |
end_offset, |
|
|
intptr_t |
fields_before, |
|
|
intptr_t |
list_size, |
|
|
intptr_t |
list_index |
|
) |
| |
|
inline |
Definition at line 287 of file kernel_binary.h.
290 {
291 intptr_t org_offset =
offset();
294 offset_ = org_offset;
296 }
uint32_t ReadFromIndexNoReset(intptr_t end_offset, intptr_t fields_before, intptr_t list_size, intptr_t list_index)
◆ ReadFromIndexNoReset()
uint32_t dart::kernel::Reader::ReadFromIndexNoReset |
( |
intptr_t |
end_offset, |
|
|
intptr_t |
fields_before, |
|
|
intptr_t |
list_size, |
|
|
intptr_t |
list_index |
|
) |
| |
|
inline |
Definition at line 305 of file kernel_binary.h.
308 {
309 offset_ = end_offset - (fields_before + list_size - list_index) * 4;
311 }
◆ ReadLineStartsData()
TypedDataPtr dart::kernel::Reader::ReadLineStartsData |
( |
intptr_t |
line_start_count | ) |
|
Definition at line 37 of file kernel_binary.cc.
37 {
38 const intptr_t start_offset =
offset();
39
40
41 intptr_t max_start = 0;
42 for (intptr_t
i = 0;
i < line_start_count; ++
i) {
45 }
46
47 const intptr_t
cid = (max_start <=
kMaxUint16) ? kTypedDataUint16ArrayCid
48 : kTypedDataUint32ArrayCid;
49 const TypedData& line_starts_data =
51
53 intptr_t current_start = 0;
54 for (intptr_t
i = 0;
i < line_start_count; ++
i) {
56 current_start +=
delta;
57 if (
cid == kTypedDataUint16ArrayCid) {
58 line_starts_data.SetUint16(
i << 1,
static_cast<uint16_t
>(current_start));
59 } else {
60 line_starts_data.SetUint32(
i << 2, current_start);
61 }
62 }
63
64 return line_starts_data.ptr();
65}
static TypedDataPtr New(intptr_t class_id, intptr_t len, Heap::Space space=Heap::kNew)
void set_offset(intptr_t offset)
constexpr uint16_t kMaxUint16
◆ ReadListLength()
intptr_t dart::kernel::Reader::ReadListLength |
( |
| ) |
|
|
inline |
◆ ReadNullability()
Definition at line 440 of file kernel_binary.h.
440 {
443 }
static Nullability ConvertNullability(KernelNullability kernel_nullability)
◆ ReadPosition()
Read and return a TokenPosition from this reader.
Definition at line 371 of file kernel_binary.h.
371 {
372
373
379 }
static const TokenPosition & Min(const TokenPosition &a, const TokenPosition &b)
static TokenPosition Deserialize(int32_t value)
static const TokenPosition & Max(const TokenPosition &a, const TokenPosition &b)
◆ ReadSLEB128()
intptr_t dart::kernel::Reader::ReadSLEB128 |
( |
| ) |
|
|
inline |
◆ ReadSLEB128AsInt64()
int64_t dart::kernel::Reader::ReadSLEB128AsInt64 |
( |
| ) |
|
|
inline |
◆ ReadTag()
Tag dart::kernel::Reader::ReadTag |
( |
uint8_t * |
payload = nullptr | ) |
|
|
inline |
Definition at line 399 of file kernel_binary.h.
399 {
401 bool has_payload =
403 if (has_payload) {
404 if (payload != nullptr) {
406 }
408 } else {
409 return static_cast<Tag>(byte);
410 }
411 }
◆ ReadUInt()
uint32_t dart::kernel::Reader::ReadUInt |
( |
| ) |
|
|
inline |
Definition at line 327 of file kernel_binary.h.
327 {
328 ASSERT((size_ >= 1) && (offset_ >= 0) && (offset_ <= size_ - 1));
329
330 const uint8_t*
buffer = raw_buffer_;
332 if ((byte0 & 0x80) == 0) {
333
334 offset_++;
335 return byte0;
336 } else if ((byte0 & 0xc0) == 0x80) {
337
338 ASSERT((size_ >= 2) && (offset_ >= 0) && (offset_ <= size_ - 2));
340 ((byte0 & ~static_cast<uword>(0x80)) << 8) | (
buffer[offset_ + 1]);
341 offset_ += 2;
343 } else {
344
345 ASSERT((size_ >= 4) && (offset_ >= 0) && (offset_ <= size_ - 4));
346 uint32_t
value = ((byte0 & ~static_cast<uword>(0xc0)) << 24) |
347 (
buffer[offset_ + 1] << 16) |
348 (
buffer[offset_ + 2] << 8) | (
buffer[offset_ + 3] << 0);
349 offset_ += 4;
351 }
352 }
◆ ReadUInt32()
uint32_t dart::kernel::Reader::ReadUInt32 |
( |
| ) |
|
|
inline |
Definition at line 313 of file kernel_binary.h.
313 {
315 offset_ += 4;
317 }
uint32_t ReadUInt32At(intptr_t offset) const
◆ ReadUInt32At()
uint32_t dart::kernel::Reader::ReadUInt32At |
( |
intptr_t |
offset | ) |
const |
|
inline |
Definition at line 298 of file kernel_binary.h.
298 {
303 }
static uint32_t BigEndianToHost32(uint32_t be_value)
◆ ReadVariance()
Variance dart::kernel::Reader::ReadVariance |
( |
| ) |
|
|
inline |
◆ set_offset()
void dart::kernel::Reader::set_offset |
( |
intptr_t |
offset | ) |
|
|
inline |
◆ size()
intptr_t dart::kernel::Reader::size |
( |
| ) |
const |
|
inline |
◆ TagName()
const char * dart::kernel::Reader::TagName |
( |
Tag |
tag | ) |
|
|
static |
Definition at line 24 of file kernel_binary.cc.
24 {
25 switch (tag) {
26#define CASE(Name, value) \
27 case k##Name: \
28 return #Name;
30#undef CASE
31 default:
32 break;
33 }
34 return "Unknown";
35}
#define CASE(Name, value)
#define KERNEL_TAG_LIST(V)
◆ typed_data()
◆ ViewFromTo()
TypedDataViewPtr dart::kernel::Reader::ViewFromTo |
( |
intptr_t |
start, |
|
|
intptr_t |
end |
|
) |
| |
|
inline |
Definition at line 481 of file kernel_binary.h.
481 {
483 }
TypedDataViewPtr ViewFromTo(intptr_t start, intptr_t end, Heap::Space space=Heap::kNew) const
◆ AlternativeReadingScope
◆ AlternativeReadingScopeWithNewData
◆ PositionScope
◆ Program
The documentation for this class was generated from the following files: