Flutter Engine
The Flutter Engine
Classes | Namespaces | Macros
object_store.h File Reference
#include "vm/object.h"

Go to the source code of this file.

Classes

class  dart::IsolateObjectStore
 
class  dart::ObjectStore
 

Namespaces

namespace  dart
 

Macros

#define FOR_EACH_BOOTSTRAP_LIBRARY(M)
 
#define OBJECT_STORE_FIELD_LIST(R_, RW, ARW_RELAXED, ARW_AR, LAZY_CORE, LAZY_ASYNC, LAZY_ISOLATE, LAZY_INTERNAL, LAZY_FFI)
 
#define OBJECT_STORE_STUB_CODE_LIST(DO)
 
#define ISOLATE_OBJECT_STORE_FIELD_LIST(R_, RW)
 
#define DECLARE_GETTER(Type, name)
 
#define DECLARE_GETTER_AND_SETTER(Type, name)
 
#define DECLARE_OBJECT_STORE_FIELD(type, name)   type##Ptr name##_;
 
#define MAKE_ID(Name, _)   k##Name,
 
#define DECLARE_OFFSET(name)    static intptr_t name##_offset() { return OFFSET_OF(ObjectStore, name##_); }
 
#define DECLARE_GETTER(Type, name)
 
#define DECLARE_GETTER_AND_SETTER(Type, name)
 
#define DECLARE_RELAXED_ATOMIC_GETTER_AND_SETTER(Type, name)
 
#define DECLARE_ACQREL_ATOMIC_GETTER_AND_SETTER(Type, name)
 
#define DECLARE_LAZY_INIT_GETTER(Type, name, init)
 
#define DECLARE_LAZY_INIT_CORE_GETTER(Type, name)    DECLARE_LAZY_INIT_GETTER(Type, name, LazyInitCoreMembers)
 
#define DECLARE_LAZY_INIT_ASYNC_GETTER(Type, name)    DECLARE_LAZY_INIT_GETTER(Type, name, LazyInitAsyncMembers)
 
#define DECLARE_LAZY_INIT_ISOLATE_GETTER(Type, name)    DECLARE_LAZY_INIT_GETTER(Type, name, LazyInitIsolateMembers)
 
#define DECLARE_LAZY_INIT_INTERNAL_GETTER(Type, name)    DECLARE_LAZY_INIT_GETTER(Type, name, LazyInitInternalMembers)
 
#define DECLARE_LAZY_INIT_FFI_GETTER(Type, name)    DECLARE_LAZY_INIT_GETTER(Type, name, LazyInitFfiMembers)
 
#define MAKE_CASE(CamelName, name)
 
#define MAKE_CASE(CamelName, name)
 
#define DECLARE_OBJECT_STORE_FIELD(type, name)   type##Ptr name##_;
 
#define DECLARE_ATOMIC_OBJECT_STORE_FIELD(type, name)    std::atomic<type##Ptr> name##_;
 
#define DECLARE_LAZY_OBJECT_STORE_FIELD(type, name)    AcqRelAtomic<type##Ptr> name##_;
 

Macro Definition Documentation

◆ DECLARE_ACQREL_ATOMIC_GETTER_AND_SETTER

#define DECLARE_ACQREL_ATOMIC_GETTER_AND_SETTER (   Type,
  name 
)
Value:
Type##Ptr name() const { return name##_.load(); } \
void set_##name(const Type& value) { name##_.store(value.ptr()); } \
DECLARE_OFFSET(name)
uint8_t value
static ObjectPtr Ptr(ObjectPtr obj)
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32

Definition at line 486 of file object_store.h.

◆ DECLARE_ATOMIC_OBJECT_STORE_FIELD

#define DECLARE_ATOMIC_OBJECT_STORE_FIELD (   type,
  name 
)     std::atomic<type##Ptr> name##_;

Definition at line 586 of file object_store.h.

◆ DECLARE_GETTER [1/2]

#define DECLARE_GETTER (   Type,
  name 
)
Value:
Type##Ptr name() const { return name##_; } \
static intptr_t name##_offset() { \
return OFFSET_OF(IsolateObjectStore, name##_); \
}
#define OFFSET_OF(type, field)
Definition: globals.h:138

Definition at line 470 of file object_store.h.

◆ DECLARE_GETTER [2/2]

#define DECLARE_GETTER (   Type,
  name 
)
Value:
Type##Ptr name() const { return name##_; } \
DECLARE_OFFSET(name)

Definition at line 470 of file object_store.h.

◆ DECLARE_GETTER_AND_SETTER [1/2]

#define DECLARE_GETTER_AND_SETTER (   Type,
  name 
)
Value:
void set_##name(const Type& value) { name##_ = value.ptr(); }
#define DECLARE_GETTER(Type, name)
Definition: object_store.h:470

Definition at line 473 of file object_store.h.

◆ DECLARE_GETTER_AND_SETTER [2/2]

#define DECLARE_GETTER_AND_SETTER (   Type,
  name 
)
Value:
void set_##name(const Type& value) { name##_ = value.ptr(); }

Definition at line 473 of file object_store.h.

◆ DECLARE_LAZY_INIT_ASYNC_GETTER

#define DECLARE_LAZY_INIT_ASYNC_GETTER (   Type,
  name 
)     DECLARE_LAZY_INIT_GETTER(Type, name, LazyInitAsyncMembers)

Definition at line 500 of file object_store.h.

◆ DECLARE_LAZY_INIT_CORE_GETTER

#define DECLARE_LAZY_INIT_CORE_GETTER (   Type,
  name 
)     DECLARE_LAZY_INIT_GETTER(Type, name, LazyInitCoreMembers)

Definition at line 498 of file object_store.h.

◆ DECLARE_LAZY_INIT_FFI_GETTER

#define DECLARE_LAZY_INIT_FFI_GETTER (   Type,
  name 
)     DECLARE_LAZY_INIT_GETTER(Type, name, LazyInitFfiMembers)

Definition at line 506 of file object_store.h.

◆ DECLARE_LAZY_INIT_GETTER

#define DECLARE_LAZY_INIT_GETTER (   Type,
  name,
  init 
)
Value:
Type##Ptr name() { \
if (name##_.load() == Type::null()) { \
init(); \
} \
return name##_.load(); \
} \
DECLARE_OFFSET(name)

Definition at line 490 of file object_store.h.

◆ DECLARE_LAZY_INIT_INTERNAL_GETTER

#define DECLARE_LAZY_INIT_INTERNAL_GETTER (   Type,
  name 
)     DECLARE_LAZY_INIT_GETTER(Type, name, LazyInitInternalMembers)

Definition at line 504 of file object_store.h.

◆ DECLARE_LAZY_INIT_ISOLATE_GETTER

#define DECLARE_LAZY_INIT_ISOLATE_GETTER (   Type,
  name 
)     DECLARE_LAZY_INIT_GETTER(Type, name, LazyInitIsolateMembers)

Definition at line 502 of file object_store.h.

◆ DECLARE_LAZY_OBJECT_STORE_FIELD

#define DECLARE_LAZY_OBJECT_STORE_FIELD (   type,
  name 
)     AcqRelAtomic<type##Ptr> name##_;

Definition at line 588 of file object_store.h.

◆ DECLARE_OBJECT_STORE_FIELD [1/2]

#define DECLARE_OBJECT_STORE_FIELD (   type,
  name 
)    type##Ptr name##_;

Definition at line 585 of file object_store.h.

◆ DECLARE_OBJECT_STORE_FIELD [2/2]

#define DECLARE_OBJECT_STORE_FIELD (   type,
  name 
)    type##Ptr name##_;

Definition at line 585 of file object_store.h.

◆ DECLARE_OFFSET

#define DECLARE_OFFSET (   name)     static intptr_t name##_offset() { return OFFSET_OF(ObjectStore, name##_); }

Definition at line 468 of file object_store.h.

◆ DECLARE_RELAXED_ATOMIC_GETTER_AND_SETTER

#define DECLARE_RELAXED_ATOMIC_GETTER_AND_SETTER (   Type,
  name 
)
Value:
template <std::memory_order order = std::memory_order_relaxed> \
Type##Ptr name() const { \
return name##_.load(order); \
} \
template <std::memory_order order = std::memory_order_relaxed> \
void set_##name(const Type& value) { \
name##_.store(value.ptr(), order); \
} \
DECLARE_OFFSET(name)

Definition at line 476 of file object_store.h.

◆ FOR_EACH_BOOTSTRAP_LIBRARY

#define FOR_EACH_BOOTSTRAP_LIBRARY (   M)
Value:
M(Core, core) \
M(Async, async) \
M(Collection, collection) \
M(Developer, developer) \
M(Ffi, ffi) \
M(Internal, _internal) \
M(Isolate, isolate) \
M(Math, math) \
M(Mirrors, mirrors) \
M(TypedData, typed_data) \
M(VMService, _vmservice)
static Editor::Movement convert(skui::Key key)
std::unique_ptr< Expression > Convert(const Context &context, Position pos, const Type &type, ExpressionArray args)
#define M(PROC, DITHER)

Definition at line 19 of file object_store.h.

◆ ISOLATE_OBJECT_STORE_FIELD_LIST

#define ISOLATE_OBJECT_STORE_FIELD_LIST (   R_,
  RW 
)
Value:
RW(UnhandledException, preallocated_unhandled_exception) \
RW(StackTrace, preallocated_stack_trace) \
RW(UnwindError, preallocated_unwind_error) \
R_(Array, dart_args_1) \
R_(Array, dart_args_2) \
R_(GrowableObjectArray, resume_capabilities) \
R_(GrowableObjectArray, exit_listeners) \
R_(GrowableObjectArray, error_listeners)

Definition at line 391 of file object_store.h.

◆ MAKE_CASE [1/2]

#define MAKE_CASE (   CamelName,
  name 
)
Value:
case k##CamelName: \
return name##_library_;

◆ MAKE_CASE [2/2]

#define MAKE_CASE (   CamelName,
  name 
)
Value:
case k##CamelName: \
name##_library_ = value.ptr(); \
break;

◆ MAKE_ID

#define MAKE_ID (   Name,
 
)    k##Name,

Definition at line 459 of file object_store.h.

◆ OBJECT_STORE_FIELD_LIST

#define OBJECT_STORE_FIELD_LIST (   R_,
  RW,
  ARW_RELAXED,
  ARW_AR,
  LAZY_CORE,
  LAZY_ASYNC,
  LAZY_ISOLATE,
  LAZY_INTERNAL,
  LAZY_FFI 
)

Definition at line 41 of file object_store.h.

◆ OBJECT_STORE_STUB_CODE_LIST

#define OBJECT_STORE_STUB_CODE_LIST (   DO)

Definition at line 296 of file object_store.h.