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()