#include <dart_api_state.h>
Definition at line 30 of file dart_api_state.h.
◆ ApiZone()
dart::ApiZone::ApiZone |
( |
| ) |
|
|
inline |
Definition at line 33 of file dart_api_state.h.
33 : zone_() {
35 Zone* zone = thread != nullptr ? thread->zone() : nullptr;
36 zone_.Link(zone);
37 if (thread != nullptr) {
38 thread->set_zone(&zone_);
39 }
40 if (FLAG_trace_zones) {
42 reinterpret_cast<intptr_t>(this),
43 reinterpret_cast<intptr_t>(&zone_));
44 }
45 }
static void static void PrintErr(const char *format,...) PRINTF_ATTRIBUTE(1
static Thread * Current()
◆ ~ApiZone()
dart::ApiZone::~ApiZone |
( |
| ) |
|
|
inline |
Definition at line 48 of file dart_api_state.h.
48 {
50#if defined(DEBUG)
51 if (thread == nullptr) {
54 }
55#endif
56 if ((thread != nullptr) && (thread->zone() == &zone_)) {
57 thread->set_zone(zone_.previous_);
58 }
59 if (FLAG_trace_zones) {
61 reinterpret_cast<intptr_t>(this),
62 reinterpret_cast<intptr_t>(&zone_));
63 }
64 }
int CountZoneHandles() const
int CountScopedHandles() const
◆ Alloc()
template<class ElementType >
ElementType * dart::ApiZone::Alloc |
( |
intptr_t |
len | ) |
|
|
inline |
Definition at line 70 of file dart_api_state.h.
70 {
71 return zone_.
Alloc<ElementType>(
len);
72 }
ElementType * Alloc(intptr_t length)
◆ AllocUnsafe()
uword dart::ApiZone::AllocUnsafe |
( |
intptr_t |
size | ) |
|
|
inline |
◆ GetZone()
Zone * dart::ApiZone::GetZone |
( |
| ) |
|
|
inline |
◆ Realloc()
template<class ElementType >
ElementType * dart::ApiZone::Realloc |
( |
ElementType * |
old_array, |
|
|
intptr_t |
old_len, |
|
|
intptr_t |
new_len |
|
) |
| |
|
inline |
Definition at line 78 of file dart_api_state.h.
80 {
81 return zone_.
Realloc<ElementType>(old_array, old_len, new_len);
82 }
ElementType * Realloc(ElementType *old_array, intptr_t old_length, intptr_t new_length)
◆ Reinit()
void dart::ApiZone::Reinit |
( |
Thread * |
thread | ) |
|
|
inline |
Definition at line 98 of file dart_api_state.h.
98 {
99 if (thread == nullptr) {
100 zone_.Link(nullptr);
101 } else {
102 zone_.Link(thread->zone());
103 thread->set_zone(&zone_);
104 }
105 }
◆ Reset()
void dart::ApiZone::Reset |
( |
Thread * |
thread | ) |
|
|
inline |
Definition at line 107 of file dart_api_state.h.
107 {
108 if ((thread != nullptr) && (thread->zone() == &zone_)) {
109 thread->set_zone(zone_.previous_);
110 }
111 zone_.Reset();
112 }
◆ SizeInBytes()
intptr_t dart::ApiZone::SizeInBytes |
( |
| ) |
const |
|
inline |
◆ ApiGrowableArray
The documentation for this class was generated from the following file: