19 trace_type_propagation,
21 "Trace flow graph type propagation");
25 if (FLAG_trace_strong_mode_types) {
33 if (FLAG_trace_strong_mode_types) {
35 if ((
type !=
nullptr) && !
type->IsDynamicType()) {
41void FlowGraphTypePropagator::Propagate(
FlowGraph* flow_graph) {
43 "FlowGraphTypePropagator");
48FlowGraphTypePropagator::FlowGraphTypePropagator(
FlowGraph* flow_graph)
50 flow_graph_(flow_graph),
52 visited_blocks_(new(flow_graph->zone())
54 flow_graph->reverse_postorder().
length())),
55 types_(flow_graph->current_ssa_temp_index()),
56 in_worklist_(nullptr),
58 collected_asserts_(nullptr) {
63 asserts_ =
new ZoneGrowableArray<AssertAssignableInstr*>(
66 asserts_->Add(
nullptr);
69 collected_asserts_ =
new ZoneGrowableArray<intptr_t>(10);
72void FlowGraphTypePropagator::Propagate() {
81 in_worklist_ =
new (flow_graph_->
zone())
83 for (intptr_t
i = 0;
i < worklist_.length();
i++) {
90 while (!worklist_.is_empty()) {
91 Definition* def = RemoveLastFromWorklist();
94 THR_Print(
"recomputing type of v%" Pd ": %s\n", def->ssa_temp_index(),
95 def->Type()->ToCString());
97 if (def->RecomputeType()) {
100 THR_Print(
" ... new type %s\n", def->Type()->ToCString());
102 for (Value::Iterator it(def->input_use_list()); !it.Done();
104 Instruction* instr = it.Current()->instruction();
106 Definition* use_defn = instr->AsDefinition();
107 if (use_defn !=
nullptr) {
108 AddToWorklist(use_defn);
115void FlowGraphTypePropagator::PropagateRecursive(BlockEntryInstr* block) {
116 if (visited_blocks_->
Contains(block->postorder_number())) {
119 visited_blocks_->
Add(block->postorder_number());
121 const intptr_t rollback_point = rollback_.
length();
128 StrengthenAsserts(block);
133 for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) {
134 Instruction* instr = it.Current();
136 for (intptr_t
i = 0;
i < instr->InputCount();
i++) {
137 VisitValue(instr->InputAt(
i));
139 if (instr->IsDefinition()) {
140 instr->AsDefinition()->RecomputeType();
145 GotoInstr* goto_instr = block->last_instruction()->AsGoto();
146 if (goto_instr !=
nullptr) {
147 JoinEntryInstr*
join = goto_instr->successor();
148 intptr_t pred_index =
join->IndexOfPredecessor(block);
150 for (PhiIterator it(
join); !it.Done(); it.Advance()) {
151 VisitValue(it.Current()->InputAt(pred_index));
155 for (intptr_t
i = 0;
i < block->dominated_blocks().
length(); ++
i) {
156 PropagateRecursive(block->dominated_blocks()[
i]);
159 RollbackTo(rollback_point);
162void FlowGraphTypePropagator::RollbackTo(intptr_t rollback_point) {
163 for (intptr_t
i = rollback_.
length() - 1;
i >= rollback_point;
i--) {
164 types_[rollback_[
i].index()] = rollback_[
i].type();
166 rollback_.TruncateTo(rollback_point);
169CompileType* FlowGraphTypePropagator::TypeOf(Definition* def) {
170 const intptr_t index = def->ssa_temp_index();
172 CompileType*
type = types_[index];
173 if (
type ==
nullptr) {
174 type = types_[index] = def->Type();
180void FlowGraphTypePropagator::SetTypeOf(Definition* def, CompileType*
type) {
181 const intptr_t index = def->ssa_temp_index();
182 rollback_.Add(RollbackEntry(index, types_[index]));
183 types_[index] =
type;
186void FlowGraphTypePropagator::SetCid(Definition* def, intptr_t
cid) {
187 CompileType* current = TypeOf(def);
188 if (current->IsNone() || (current->ToCid() !=
cid)) {
193void FlowGraphTypePropagator::GrowTypes(intptr_t up_to) {
195 for (intptr_t
i = types_.length();
i <= up_to; ++
i) {
200void FlowGraphTypePropagator::EnsureMoreAccurateRedefinition(
202 Definition* original,
203 CompileType new_type) {
204 RedefinitionInstr* redef =
206 if (redef !=
nullptr) {
207 GrowTypes(redef->ssa_temp_index() + 1);
211void FlowGraphTypePropagator::VisitValue(
Value*
value) {
212 CompileType*
type = TypeOf(
value->definition());
217 if (
type->IsNone() &&
value->instruction()->IsPhi()) {
225 THR_Print(
"reaching type to %s for v%" Pd " is %s\n",
226 value->instruction()->ToCString(),
227 value->definition()->ssa_temp_index(),
228 value->Type()->ToCString());
234 worklist_.Add(it.Current());
239 SetCid(
check->value()->definition(), kSmiCid);
245 SetCid(
check->index()->definition(), kSmiCid);
257 for (intptr_t
i = 0, n = cids.
length();
i < n;
i++) {
260 for (intptr_t
cid = cid_range->
cid_start; cid <= cid_range->cid_end;
273 check->value()->definition()->OriginalDefinition()->AsLoadClassId();
274 if (load_cid !=
nullptr &&
check->cids().IsSingleCid()) {
282 if (
type->is_nullable()) {
288 if (
check->ssa_temp_index() == -1) {
290 GrowTypes(
check->ssa_temp_index() + 1);
301void FlowGraphTypePropagator::CheckNonNullSelector(
310 const Class& null_class =
311 Class::Handle(thread->isolate_group()->object_store()->null_class());
319 CompileType*
type = TypeOf(receiver);
320 if (
type->is_nullable()) {
323 EnsureMoreAccurateRedefinition(
call, receiver,
type->CopyNonNullable());
360 const bool is_nullable =
370 auto defn =
check->value()->definition();
372 if (
check->ssa_temp_index() == -1) {
374 GrowTypes(
check->ssa_temp_index() + 1);
388 if (comparison ==
nullptr)
return;
389 bool negated = comparison->kind() == Token::kNE_STRICT;
396 bool is_simple_instance_of =
397 (
call !=
nullptr) &&
call->MatchesCoreName(Symbols::_simpleInstanceOf());
402 EnsureMoreAccurateRedefinition(true_successor,
405 }
else if ((is_simple_instance_of || (instance_of !=
nullptr)) &&
415 if (is_simple_instance_of) {
417 const Object& type_obj =
call->ArgumentAt(1)->AsConstant()->value();
418 if (!type_obj.IsType()) {
421 type = &Type::Cast(type_obj);
422 left =
call->ArgumentAt(0);
427 if (!
type->IsTopTypeForInstanceOf()) {
428 const bool is_nullable = (
type->IsNullable() ||
type->IsTypeParameter())
431 EnsureMoreAccurateRedefinition(
432 true_successor, left,
441 EnsureMoreAccurateRedefinition(
450 EnsureMoreAccurateRedefinition(
455 Object::sentinel().ptr()) {
459 EnsureMoreAccurateRedefinition(
465 Object::sentinel().ptr()) {
469 EnsureMoreAccurateRedefinition(
476void FlowGraphTypePropagator::AddToWorklist(
Definition* defn) {
482 if (!in_worklist_->
Contains(index)) {
484 in_worklist_->
Add(index);
488Definition* FlowGraphTypePropagator::RemoveLastFromWorklist() {
489 Definition* defn = worklist_.RemoveLast();
490 ASSERT(defn->ssa_temp_index() != -1);
491 in_worklist_->
Remove(defn->ssa_temp_index());
499void FlowGraphTypePropagator::StrengthenAsserts(BlockEntryInstr* block) {
500 for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) {
501 Instruction* instr = it.Current();
503 if (instr->IsCheckSmi() || instr->IsCheckClass()) {
504 StrengthenAssertWith(instr);
508 AssertAssignableInstr* assert = instr->AsAssertAssignable();
509 if (assert !=
nullptr) {
510 Definition* defn = assert->value()->definition()->OriginalDefinition();
511 if ((*asserts_)[defn->ssa_temp_index()] ==
nullptr) {
512 (*asserts_)[defn->ssa_temp_index()] = assert;
513 collected_asserts_->
Add(defn->ssa_temp_index());
518 for (intptr_t
i = 0;
i < collected_asserts_->
length();
i++) {
519 (*asserts_)[(*collected_asserts_)[
i]] =
nullptr;
525void FlowGraphTypePropagator::StrengthenAssertWith(Instruction*
check) {
528 AssertAssignableInstr* kStrengthenedAssertMarker =
529 reinterpret_cast<AssertAssignableInstr*
>(-1);
531 Definition* defn =
check->InputAt(0)->definition()->OriginalDefinition();
533 AssertAssignableInstr* assert = (*asserts_)[defn->ssa_temp_index()];
534 if ((assert ==
nullptr) || (assert == kStrengthenedAssertMarker)) {
537 ASSERT(assert->env() !=
nullptr);
539 Instruction* check_clone =
nullptr;
540 if (
check->IsCheckSmi()) {
541 check_clone =
new CheckSmiInstr(assert->value()->Copy(zone()),
542 assert->deopt_id(),
check->source());
546 new CheckClassInstr(assert->value()->Copy(zone()), assert->deopt_id(),
547 check->AsCheckClass()->cids(),
check->source());
549 ASSERT(check_clone !=
nullptr);
550 check_clone->InsertBefore(assert);
551 assert->env()->DeepCopyTo(zone(), check_clone);
553 (*asserts_)[defn->ssa_temp_index()] = kStrengthenedAssertMarker;
566 can_be_null_ = can_be_null_ || other->can_be_null_;
567 can_be_sentinel_ = can_be_sentinel_ || other->can_be_sentinel_;
570 if ((cid_ ==
kNullCid) || (cid_ == kSentinelCid)) {
572 type_ = other->type_;
577 if ((other->cid_ ==
kNullCid) || (other->cid_ == kSentinelCid)) {
582 if (cid_ != other->cid_) {
588 type_ = other_abstract_type;
597 !abstract_type->IsFunctionType() && !abstract_type->IsRecordType()) {
610 type_ = &Object::dynamic_type();
615 ASSERT(new_type !=
nullptr);
622 if (old_type ==
nullptr || old_type->
IsNone()) {
632 const intptr_t new_type_cid = new_type->
ToCid();
633 const intptr_t old_type_cid = old_type->
ToCid();
634 if (new_type_cid != old_type_cid) {
636 preferred_type = new_type;
638 preferred_type = old_type;
642 if (preferred_type ==
nullptr) {
648 preferred_type = old_type;
650 preferred_type = new_type;
653 preferred_type = old_type;
657 preferred_type = new_type;
666 if ((preferred_type->
is_nullable() && !can_be_null) ||
669 preferred_type->type_);
673 return preferred_type;
679 bool can_be_sentinel) {
709 ASSERT(rep != kNoRepresentation);
715 &Object::dynamic_type());
720 &Object::dynamic_type());
739#if defined(HAS_SMI_63_BITS)
786 if ((type_ !=
nullptr) && type_->
IsNullType()) {
796 (can_be_sentinel_ && (cid_ != kSentinelCid))) {
805 if (type_ ==
nullptr) {
822 &implementation_cid)) {
823 cid_ = implementation_cid;
832 if (can_be_sentinel_ && (cid_ != kSentinelCid)) {
840 return !can_be_null_ ||
IsNull();
848 if (type_ ==
nullptr) {
851 return &Object::dynamic_type();
857 type_ = &Object::dynamic_type();
923 class_ids->
Add(cid_);
932 if (can_be_sentinel_) {
933 class_ids->
Add(kSentinelCid);
946 if (
type.IsInstantiated()) {
948 }
else if (
type.IsTypeParameter()) {
950 const auto& param = TypeParameter::Cast(
type);
953 }
else if (
type.HasTypeClass()) {
963 if (
type.IsFutureOrType() ||
977 return cid_ == kSmiCid;
996 if (
type.IsTypeParameter()) {
997 type = TypeParameter::Cast(
type).bound();
999 if (
type.IsTypeParameter()) {
1003 const intptr_t type_class_id =
type.type_class_id();
1005 type_class_id == kInstanceCid || type_class_id == kFutureOrCid) {
1036 if (can_be_sentinel_) {
1042 const char* type_name =
"?";
1044 f->AddString(
"T{}");
1050 }
else if (type_ !=
nullptr) {
1053 type_name =
"!null";
1056 f->Printf(
"T{%s%s%s}", type_name, can_be_null_ ?
"?" :
"",
1057 can_be_sentinel_ ?
"~" :
"");
1068 if (reaching_type_ ==
nullptr) {
1071 return reaching_type_;
1081 if (
type !=
nullptr &&
type->owner() !=
nullptr &&
1085 reaching_type_ =
type;
1102 THR_Print(
" phi %" Pd " input %" Pd ": v%" Pd " has reaching type %s\n",
1118 if (constrained_type_ !=
nullptr) {
1124 const bool is_nullable =
1128 constrained_type_->can_be_sentinel();
1133 value()->
Type()->ToNullableCid(),
nullptr);
1135 if (constrained_type_->ToNullableCid() !=
kDynamicCid) {
1137 constrained_type_->ToNullableCid(),
nullptr);
1141 value()->
Type()->IsSubtypeOf(*constrained_type_->ToAbstractType())
1143 : *constrained_type_);
1147 if (!can_be_sentinel) {
1161 if (
type->is_nullable()) {
1202 if (graph_entry ==
nullptr) {
1203 if (
auto function_entry = block_->AsFunctionEntry()) {
1204 graph_entry = function_entry->graph_entry();
1205 }
else if (
auto osr_entry = block_->AsOsrEntry()) {
1206 graph_entry = osr_entry->graph_entry();
1207 }
else if (
auto catch_entry = block_->AsCatchBlockEntry()) {
1208 graph_entry = catch_entry->graph_entry();
1225 if (
function.IsIrregexpFunction()) {
1229 switch (env_index()) {
1244 if (param_index >= 0) {
1249 if (
type.IsObjectType() ||
type.IsNullType()) {
1264 cid = type_class.
id();
1266 if (FLAG_use_cha_deopt ||
1268 if (FLAG_trace_cha) {
1270 " **(CHA) Computing exact type of receiver, "
1271 "no subclasses: %s\n",
1274 if (FLAG_use_cha_deopt) {
1280 cid = type_class.
id();
1290 const bool is_unchecked_entry_param =
1296 ASSERT(param !=
nullptr);
1300 bool inferred_nullable =
true;
1301 if (!block_->IsCatchBlockEntry()) {
1304 if (inferred_type !=
nullptr) {
1308 return *inferred_type;
1320 if ((
function.name() != Symbols::EqualOperator().ptr()) &&
1322 (is_unchecked_entry_param &&
1327 block_->IsCatchBlockEntry() && param->
is_late(),
1334 if (inferred_type !=
nullptr) {
1336 return *inferred_type;
1340 if (block_->IsCatchBlockEntry()) {
1361 if ((
cid != kTypeArgumentsCid) &&
value().IsInstance()) {
1376 const AbstractType* abs_type = &AbstractType::dynamic_type();
1377 if (
dst_type()->BindsToConstant() &&
1378 dst_type()->BoundConstant().IsAbstractType()) {
1379 abs_type = &AbstractType::Cast(
dst_type()->BoundConstant());
1436 kContextCid, &Object::dynamic_type());
1441 kContextCid, &Object::dynamic_type());
1446 kContextCid, &Object::dynamic_type());
1455 if (inferred_type !=
nullptr) {
1458 return *inferred_type;
1478 case Token::kNEGATE:
1506 if (inferred_type !=
nullptr) {
1508 return *inferred_type;
1519 if (result_type.IsInstantiated()) {
1531 if (
target.has_pragma()) {
1543 Value* type_args_value) {
1544 ASSERT(inferred_type !=
nullptr);
1547 if ((
cid == kGrowableObjectArrayCid ||
cid == kArrayCid ||
1548 cid == kImmutableArrayCid) &&
1558 type_args = type_args.FromInstanceTypeArguments(thread, cls);
1563 type.SetIsFinalized();
1567 return *inferred_type;
1580 if (inferred_type !=
nullptr) {
1583 return *inferred_type;
1589 if (function_.has_pragma()) {
1607 if (
local().needs_covariant_check_in_method()) {
1636 bool is_nullable =
true;
1642 is_nullable =
false;
1649 is_nullable =
false;
1651 abstract_type =
nullptr;
1662 return CompileType(is_nullable, can_be_sentinel,
cid, abstract_type);
1681 if (!func.IsNull()) {
1702 if (
slot().IsRecordField()) {
1704 slot().offset_in_bytes());
1705 if (
auto* alloc =
instance()->definition()->AsAllocateSmallRecord()) {
1706 if (index < alloc->num_fields()) {
1707 return *(alloc->InputAt(index)->Type());
1711 if (instance_type->IsRecordType()) {
1712 const auto& record_type = RecordType::Cast(*instance_type);
1713 if (index < record_type.NumFields()) {
1714 const auto& field_type =
1732 case kOneByteStringCid:
1733 case kTwoByteStringCid:
1776#define kInt8Cid kSmiCid
1777#define CASE(Arity, Mask, Name, Args, Result) k##Result##Cid,
1803 case kUnboxedDouble:
1828 return Object::dynamic_type().ptr();
1831 if (
cid == kGrowableObjectArrayCid ||
cid == kArrayCid ||
1832 cid == kImmutableArrayCid ||
1835 const auto& type_args =
1839 return Object::dynamic_type().ptr();
1849 if (!elem_type.IsDynamicType()) {
1850 return elem_type.ptr();
1859 if (!elem_type.IsDynamicType()) {
1866 if (
auto* load_field = array->
definition()->AsLoadField()) {
1867 if (load_field->slot().IsIdentical(Slot::GrowableObjectArray_data())) {
1868 array = load_field->instance();
1870 if (!elem_type.IsDynamicType()) {
1880 if (
auto* load_field = array->
definition()->AsLoadField()) {
1881 if (load_field->slot().IsDartField()) {
1882 elem_type = load_field->slot().field().type();
1902 case kImmutableArrayCid: {
1904 if (result_type_ !=
nullptr &&
1912 case kTypeArgumentsCid:
1927 if ((class_id_ == kArrayCid) || (class_id_ == kImmutableArrayCid)) {
static float prev(float f)
#define check(reporter, ref, unref, make, kill)
#define DEBUG_ASSERT(cond)
bool IsSubtypeOf(const AbstractType &other, Heap::Space space, FunctionTypeMapping *function_type_equivalence=nullptr) const
virtual classid_t type_class_id() const
bool IsDartFunctionType() const
bool IsTopTypeForSubtyping() const
bool IsDartRecordType() const
const char * ScrubbedNameCString() const
bool IsObjectType() const
bool IsTopTypeForInstanceOf() const
virtual bool IsInstantiated(Genericity genericity=kAny, intptr_t num_free_fun_type_params=kAllFree) const
StringPtr ScrubbedName() const
virtual ClassPtr type_class() const
bool IsDynamicType() const
bool IsSentinelType() const
bool IsStrictlyNonNullable() const
virtual CompileType ComputeType() const
const Function & known_function() const
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
const Class & cls() const
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
classid_t class_id() const
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
static constexpr intptr_t kElementTypeTypeArgPos
virtual CompileType ComputeType() const
virtual bool RecomputeType()
virtual CompileType ComputeType() const
void TruncateTo(intptr_t length)
virtual CompileType ComputeType() const
bool Contains(intptr_t i) const
static const Bool & False()
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
Representation from_representation() const
virtual CompileType ComputeType() const
virtual bool RecomputeType()
virtual bool ValueFitsSmi() const
virtual CompileType ComputeType() const
Representation from_representation() const
TargetEntryInstr * false_successor() const
TargetEntryInstr * true_successor() const
ComparisonInstr * comparison() const
static bool HasSubclasses(const Class &cls)
void AddToGuardedClassesForSubclassCount(const Class &cls, intptr_t subclass_count)
static bool ConcreteSubclasses(const Class &cls, GrowableArray< intptr_t > *class_ids)
static bool ClassCanBeFuture(const Class &cls)
static bool HasSingleConcreteImplementation(const Class &interface, intptr_t *implementation_cid)
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
virtual bool RecomputeType()
virtual bool RecomputeType()
virtual CompileType ComputeType() const
intptr_t MonomorphicReceiverCid() const
CidRange * At(int index) const
bool IsMonomorphic() const
ClassPtr At(intptr_t cid) const
const char * ScrubbedNameCString() const
StringPtr ScrubbedName() const
intptr_t NumTypeArguments() const
bool is_future_subtype() const
ClassPtr SuperClass(ClassTable *class_table=nullptr) const
virtual CompileType ComputeType() const
static CompileType * ComputeRefinedType(CompileType *old_type, CompileType *new_type)
void Union(CompileType *other)
bool IsAssignableTo(const AbstractType &other)
static constexpr bool kCanBeSentinel
CompileType CopyNonNullable()
static CompileType FromCid(intptr_t cid)
static constexpr bool kCannotBeSentinel
bool can_be_sentinel() const
bool IsInstanceOf(const AbstractType &other)
CompileType(bool can_be_null, bool can_be_sentinel, intptr_t cid, const AbstractType *type)
static CompileType DynamicOrSentinel()
static constexpr bool kCannotBeNull
static constexpr bool kCanBeNull
bool IsSubtypeOf(const AbstractType &other)
static CompileType Dynamic()
bool Specialize(GrowableArray< intptr_t > *class_ids)
static CompileType String()
static CompileType Null()
static CompileType NullableDouble()
static CompileType Object()
static CompileType FromRepresentation(Representation rep)
static CompileType Int32()
CompileType CopyNonSentinel()
static CompileType FromAbstractType(const AbstractType &type, bool can_be_null, bool can_be_sentinel)
static CompileType NullableInt()
const char * ToCString() const
void PrintTo(BaseTextBuffer *f) const
static CompileType Bool()
bool HasDecidableNullability()
static CompileType None()
const AbstractType * ToAbstractType()
static CompileType FromUnboxedRepresentation(Representation rep)
static CompileType Double()
const Class & ComparableClass()
static CompilerState & Current()
virtual CompileType ComputeType() const
const Object & value() const
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
Value * type_arguments() const
PRINT_OPERANDS_TO_SUPPORT PRINT_TO_SUPPORT bool UpdateType(CompileType new_type)
intptr_t ssa_temp_index() const
virtual CompileType ComputeType() const
const Function & interface_target() const
virtual PRINT_OPERANDS_TO_SUPPORT CompileType ComputeType() const
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
bool has_initializer() const
bool needs_load_guard() const
intptr_t guarded_cid() const
AbstractTypePtr type() const
virtual void VisitPolymorphicInstanceCall(PolymorphicInstanceCallInstr *instr)
virtual void VisitAssertBoolean(AssertBooleanInstr *instr)
virtual void VisitCheckClassId(CheckClassIdInstr *instr)
virtual void VisitCheckNull(CheckNullInstr *instr)
virtual void VisitCheckSmi(CheckSmiInstr *instr)
static void Propagate(FlowGraph *flow_graph)
virtual void VisitAssertSubtype(AssertSubtypeInstr *instr)
virtual void VisitAssertAssignable(AssertAssignableInstr *instr)
virtual void VisitJoinEntry(JoinEntryInstr *instr)
virtual void VisitGuardFieldClass(GuardFieldClassInstr *instr)
virtual void VisitInstanceCall(InstanceCallInstr *instr)
virtual void VisitCheckArrayBound(CheckArrayBoundInstr *instr)
virtual void VisitBranch(BranchInstr *instr)
virtual void VisitCheckClass(CheckClassInstr *instr)
GraphEntryInstr * graph_entry() const
bool should_print() const
intptr_t current_ssa_temp_index() const
RedefinitionInstr * EnsureRedefinition(Instruction *prev, Definition *original, CompileType compile_type)
void AllocateSSAIndex(Definition *def)
static void RenameDominatedUses(Definition *def, Instruction *dom, Definition *other)
virtual bool RecomputeType()
virtual CompileType ComputeType() const
bool IsCompiledForOsr() const
FunctionEntryInstr * unchecked_entry() const
const ParsedFunction & parsed_function() const
const Field & field() const
intptr_t GetReceiverClassIdAt(intptr_t index) const
virtual CompileType ComputeType() const
CompileType * result_type() const
const ICData * ic_data() const
const Function & interface_target() const
Token::Kind token_kind() const
virtual CompileType ComputeType() const
const String & function_name() const
bool has_unique_selector() const
const AbstractType & type() const
virtual CompileType ComputeType() const
static bool NullIsAssignableTo(const AbstractType &other)
const char * ToCString() const
Value * ArgumentValueAt(intptr_t index) const
virtual CompileType ComputeType() const
bool all_classes_finalized() const
ObjectStore * object_store() const
static IsolateGroup * Current()
ClassTable * class_table() const
bool PrintPropertyStr(const char *name, const String &s, intptr_t offset=0, intptr_t count=-1)
void PrintPropertyBool(const char *name, bool b)
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
bool can_pack_into_smi() const
intptr_t class_id() const
const Slot & slot() const
virtual CompileType ComputeType() const
intptr_t class_id() const
virtual bool RecomputeType()
virtual CompileType ComputeType() const
const LocalVariable & local() const
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
const Field & field() const
CompileType * inferred_type() const
const AbstractType & static_type() const
bool was_type_checked_by_caller() const
CompileType * inferred_arg_type() const
bool is_explicit_covariant_parameter() const
virtual CompileType ComputeType() const
static intptr_t ResultCidFromPragma(const Object &function_or_field)
intptr_t GetClassId() const
virtual const char * ToCString() const
static Object & ZoneHandle()
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
intptr_t param_index() const
const Function & function() const
LocalScope * scope() const
LocalVariable * ParameterVariable(intptr_t i) const
LocalVariable * RawParameterVariable(intptr_t i) const
virtual bool RecomputeType()
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
bool IsSureToCallSingleRecognizedTarget() const
const CallTargets & targets() const
virtual bool RecomputeType()
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
static FunctionPtr ResolveDynamicAnyArgs(Zone *zone, const Class &receiver_class, const String &function_name, bool allow_add)
virtual CompileType ComputeType() const
CompileType * result_type() const
const Function & function() const
bool is_known_list_constructor() const
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
virtual Value * InputAt(intptr_t i) const
intptr_t ArgumentCount() const
bool calls_initializer() const
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
static Thread * Current()
CompilerState & compiler_state()
IsolateGroup * isolate_group() const
static TypePtr NullableIntType()
static TypePtr NullableDouble()
static TypePtr MintType()
static TypePtr NullType()
static TypePtr StringType()
static TypePtr BoolType()
static TypePtr ObjectType()
static TypePtr New(const Class &clazz, const TypeArguments &arguments, Nullability nullability=Nullability::kNonNullable, Heap::Space space=Heap::kOld)
virtual CompileType ComputeType() const
virtual CompileType ComputeType() const
bool BindsToConstant() const
void SetReachingType(CompileType *type)
const Object & BoundConstant() const
Definition * definition() const
void RefineReachingType(CompileType *type)
intptr_t InputCount() const
Value * InputAt(intptr_t i) const
char * MakeCopyOfString(const char *str)
static intptr_t field_index_at_offset(intptr_t offset_in_bytes)
#define THR_Print(format,...)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
constexpr bool FLAG_support_il_printer
Dart_NativeFunction function
#define SIMD_OP_LIST(M, BINARY_OP)
static CompileType ComputeListFactoryType(CompileType *inferred_type, Value *type_args_value)
DART_EXPORT bool IsNull(Dart_Handle object)
static const intptr_t simd_op_result_cids[]
static AbstractTypePtr GetElementTypeFromArray(Value *array)
static AbstractTypePtr ExtractElementTypeFromArrayType(const AbstractType &array_type)
static CompileType ComputeArrayElementType(Value *array)
static bool CanPotentiallyBeSmi(const AbstractType &type, bool recurse)
DEFINE_FLAG(bool, print_cluster_information, false, "Print information about clusters written to snapshot")
static Dart_TypedData_Type GetType(intptr_t class_id)
bool IsInternalOnlyClassId(intptr_t index)
const char *const function_name
static void TraceStrongModeType(const Instruction *instr, const AbstractType &type)
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
def array_type(data_type)
static SkString join(const CommandLineFlags::StringArray &)
static bool RequiresAllocation(Representation rep)
static intptr_t BoxCid(Representation rep)
bool IsIllegalRange() const
static constexpr bool IsUnboxedInteger(Representation rep)
static constexpr bool IsUnboxed(Representation rep)
static Representation RepresentationOfArrayElement(classid_t cid)
#define TIMELINE_DURATION(thread, stream, name)
#define CASE(Arity, Mask, Name, Args, Result)