5#ifndef RUNTIME_VM_COMPILER_COMPILER_STATE_H_
6#define RUNTIME_VM_COMPILER_COMPILER_STATE_H_
8#if defined(DART_PRECOMPILED_RUNTIME)
9#error "AOT runtime should not use compiler sources (including header files)"
21struct CompilerPassState;
45 previous_ =
thread->SetCompilerState(
this);
50 thread()->SetCompilerState(previous_);
55 intptr_t
deopt_id()
const {
return deopt_id_; }
63 const intptr_t
id = deopt_id_;
75 bool is_aot()
const {
return is_aot_; }
132 const Class& TypedListClass();
135 intptr_t deopt_id_ = 0;
145 const bool is_optimizing_;
151 const Class* comparable_class_ =
nullptr;
152 const Function* interpolate_ =
nullptr;
153 const Function* interpolate_single_ =
nullptr;
154 const Class* typed_list_class_ =
nullptr;
155 const Class* array_class_ =
nullptr;
156 const Class* compound_class_ =
nullptr;
157 const Class* struct_class_ =
nullptr;
158 const Class* typed_data_class_ =
nullptr;
159 const Class* union_class_ =
nullptr;
160 const Field* compound_offset_in_bytes_field_ =
nullptr;
161 const Field* compound_typed_data_base_field_ =
nullptr;
162 const Function* typed_list_get_float32_ =
nullptr;
163 const Function* typed_list_set_float32_ =
nullptr;
164 const Function* typed_list_get_float64_ =
nullptr;
165 const Function* typed_list_set_float64_ =
nullptr;
166 const Function* typed_list_get_float32x4_ =
nullptr;
167 const Function* typed_list_set_float32x4_ =
nullptr;
168 const Function* typed_list_get_int32x4_ =
nullptr;
169 const Function* typed_list_set_int32x4_ =
nullptr;
170 const Function* typed_list_get_float64x2_ =
nullptr;
171 const Function* typed_list_set_float64x2_ =
nullptr;
173 const Function* function_ =
nullptr;
184 prev_deopt_id_(
thread->compiler_state().deopt_id()) {
191 const intptr_t prev_deopt_id_;
202 prev_deopt_id_(
thread->compiler_state().deopt_id()) {}
205 ASSERT(
thread()->compiler_state().deopt_id() == prev_deopt_id_);
209 const intptr_t prev_deopt_id_;
AssertNoDeoptIdsAllocatedScope(Thread *thread)
~AssertNoDeoptIdsAllocatedScope()
const Class & CompoundClass()
void set_slot_cache(SlotCache *cache)
const Class & ComparableClass()
intptr_t deopt_id() const
const Function & TypedListSetFloat64()
const Class & ArrayClass()
intptr_t GetNextDeoptId()
bool is_optimizing() const
void set_current_pass(const CompilerPass *pass, const CompilerPassState *pass_state)
const Function & TypedListGetFloat32()
const Function & TypedListGetInt32x4()
const Function & TypedListGetFloat32x4()
const Function & TypedListSetFloat32x4()
const Function & StringBaseInterpolateSingle()
CompilerState(Thread *thread, bool is_aot, bool is_optimizing, CompilerTracing tracing=CompilerTracing::kOn)
bool should_clone_fields()
void set_deopt_id(int value)
const Function & TypedListSetInt32x4()
const CompilerPass * pass() const
void set_function(const Function &function)
const Class & UnionClass()
bool should_trace() const
static bool ShouldTrace()
const Class & StructClass()
const Function & TypedListGetFloat64x2()
const Function & TypedListSetFloat64x2()
static CompilerState & Current()
const Class & TypedDataClass()
const Field & CompoundTypedDataBaseField()
const Function & TypedListGetFloat64()
const Function & StringBaseInterpolate()
const Field & CompoundOffsetInBytesField()
const CompilerPassState * pass_state() const
const Function & TypedListSetFloat32()
SlotCache * slot_cache() const
const Function * function() const
DeoptIdScope(Thread *thread, intptr_t deopt_id)
static constexpr intptr_t kNone
static intptr_t Next(intptr_t deopt_id)
static Thread * Current()
CompilerState & compiler_state()
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 The size limit in megabytes for the Dart VM old gen heap space enable Enable the Impeller renderer on supported platforms Ignored if Impeller is not supported on the platform enable vulkan Enable loading Vulkan validation layers The layers must be available to the application and loadable On non Vulkan this flag does nothing enable vulkan gpu tracing
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 Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however Start app with an specific route defined on the framework flutter assets Path to the Flutter assets directory enable service port Allow the VM service to fallback to automatic port selection if binding to a specified port fails trace Trace early application lifecycle Automatically switches to an endless trace buffer trace skia Filters out all Skia trace event categories except those that are specified in this comma separated list dump skp on shader Automatically dump the skp that triggers new shader compilations This is useful for writing custom ShaderWarmUp to reduce jank By this is not enabled to reduce the overhead purge persistent cache