5#ifndef RUNTIME_VM_COMPILER_BACKEND_IL_H_
6#define RUNTIME_VM_COMPILER_BACKEND_IL_H_
8#if defined(DART_PRECOMPILED_RUNTIME)
9#error "AOT runtime should not use compiler sources (including header files)"
46class BlockEntryWithInitialDefs;
49class CatchBlockEntryInstr;
50class CheckBoundBaseInstr;
55class FlowGraphCompiler;
56class FlowGraphVisitor;
57class ForwardInstructionIterator;
59class InstructionVisitor;
68class UnboxIntegerInstr;
83 bool Done()
const {
return current_ ==
nullptr; }
87 if (next_ !=
nullptr) next_ = next_->
next_use();
97 previous_use_(nullptr),
99 instruction_(nullptr),
101 reaching_type_(nullptr) {}
118 return (next_use_ ==
nullptr) && (previous_use_ ==
nullptr);
140 copy->reaching_type_ = reaching_type_;
151#if defined(INCLUDE_IL_PRINTER)
190 Value* previous_use_;
203 CidRange(intptr_t cid_start_arg, intptr_t cid_end_arg)
259 if (range.Contains(
cid)) {
271 cid_subtype_ranges_nullable_(),
272 cid_subtype_ranges_abstract_nullable_(),
273 cid_subtype_ranges_nonnullable_(),
274 cid_subtype_ranges_abstract_nonnullable_() {
285 bool include_abstract,
289 intptr_t* lower_limit,
290 intptr_t* upper_limit);
324 bool include_abstract,
337 bool include_abstract,
340 std::unique_ptr<CidRangeVector[]> cid_subtype_ranges_nullable_;
341 std::unique_ptr<CidRangeVector[]> cid_subtype_ranges_abstract_nullable_;
342 std::unique_ptr<CidRangeVector[]> cid_subtype_ranges_nonnullable_;
343 std::unique_ptr<CidRangeVector[]> cid_subtype_ranges_abstract_nonnullable_;
348template <
typename T,
intptr_t N>
365 const T&
At(intptr_t
i)
const {
return (*
this)[
i]; }
367 void SetAt(intptr_t
i,
const T& val) { (*this)[
i] = val; }
379 static T sentinel =
nullptr;
384 static T sentinel =
nullptr;
405#define FOR_EACH_INSTRUCTION(M) \
406 M(GraphEntry, kNoGC) \
407 M(JoinEntry, kNoGC) \
408 M(TargetEntry, kNoGC) \
409 M(FunctionEntry, kNoGC) \
410 M(NativeEntry, kNoGC) \
412 M(IndirectEntry, kNoGC) \
413 M(CatchBlockEntry, kNoGC) \
415 M(Redefinition, kNoGC) \
416 M(ReachabilityFence, kNoGC) \
417 M(Parameter, kNoGC) \
418 M(NativeParameter, kNoGC) \
419 M(LoadIndexedUnsafe, kNoGC) \
420 M(StoreIndexedUnsafe, kNoGC) \
421 M(MemoryCopy, kNoGC) \
423 M(ParallelMove, kNoGC) \
424 M(MoveArgument, kNoGC) \
425 M(DartReturn, kNoGC) \
426 M(NativeReturn, kNoGC) \
431 M(IndirectGoto, kNoGC) \
433 M(AssertAssignable, _) \
434 M(AssertSubtype, _) \
435 M(AssertBoolean, _) \
438 M(LeafRuntimeCall, kNoGC) \
440 M(PolymorphicInstanceCall, _) \
441 M(DispatchTableCall, _) \
443 M(CachableIdempotentCall, _) \
444 M(LoadLocal, kNoGC) \
445 M(DropTemps, kNoGC) \
447 M(StoreLocal, kNoGC) \
448 M(StrictCompare, kNoGC) \
449 M(EqualityCompare, kNoGC) \
450 M(RelationalOp, kNoGC) \
452 M(DebugStepCheck, _) \
453 M(RecordCoverage, kNoGC) \
454 M(LoadIndexed, kNoGC) \
455 M(LoadCodeUnits, _) \
456 M(StoreIndexed, kNoGC) \
458 M(LoadStaticField, _) \
459 M(StoreStaticField, kNoGC) \
460 M(BooleanNegate, kNoGC) \
461 M(BoolToInt, kNoGC) \
462 M(IntToBool, kNoGC) \
465 M(AllocateObject, _) \
466 M(AllocateClosure, _) \
467 M(AllocateRecord, _) \
468 M(AllocateSmallRecord, _) \
469 M(AllocateTypedData, _) \
471 M(LoadUntagged, kNoGC) \
472 M(CalculateElementAddress, kNoGC) \
473 M(LoadClassId, kNoGC) \
474 M(InstantiateType, _) \
475 M(InstantiateTypeArguments, _) \
476 M(AllocateContext, _) \
477 M(AllocateUninitializedContext, _) \
479 M(BinarySmiOp, kNoGC) \
480 M(BinaryInt32Op, kNoGC) \
481 M(HashDoubleOp, kNoGC) \
482 M(HashIntegerOp, kNoGC) \
483 M(UnarySmiOp, kNoGC) \
484 M(UnaryDoubleOp, kNoGC) \
485 M(CheckStackOverflow, _) \
486 M(SmiToDouble, kNoGC) \
487 M(Int32ToDouble, kNoGC) \
488 M(Int64ToDouble, kNoGC) \
489 M(DoubleToInteger, _) \
490 M(DoubleToSmi, kNoGC) \
491 M(DoubleToFloat, kNoGC) \
492 M(FloatToDouble, kNoGC) \
493 M(FloatCompare, kNoGC) \
494 M(CheckClass, kNoGC) \
495 M(CheckClassId, kNoGC) \
497 M(CheckNull, kNoGC) \
498 M(CheckCondition, kNoGC) \
500 M(UnboxedConstant, kNoGC) \
501 M(CheckEitherNonSmi, kNoGC) \
502 M(BinaryDoubleOp, kNoGC) \
503 M(DoubleTestOp, kNoGC) \
504 M(MathMinMax, kNoGC) \
508 M(UnboxInt64, kNoGC) \
509 M(CaseInsensitiveCompare, kNoGC) \
510 M(BinaryInt64Op, kNoGC) \
511 M(ShiftInt64Op, kNoGC) \
512 M(SpeculativeShiftInt64Op, kNoGC) \
513 M(UnaryInt64Op, kNoGC) \
514 M(CheckArrayBound, kNoGC) \
515 M(GenericCheckBound, kNoGC) \
516 M(CheckWritable, kNoGC) \
517 M(Constraint, kNoGC) \
518 M(StringToCharCode, kNoGC) \
519 M(OneByteStringFromCharCode, kNoGC) \
521 M(InvokeMathCFunction, kNoGC) \
522 M(TruncDivMod, kNoGC) \
524 M(GuardFieldClass, _) \
525 M(GuardFieldLength, _) \
526 M(GuardFieldType, _) \
527 M(IfThenElse, kNoGC) \
528 M(MaterializeObject, _) \
531 M(TestRange, kNoGC) \
532 M(ExtractNthOutput, kNoGC) \
534 M(UnboxLane, kNoGC) \
536 M(BinaryUint32Op, kNoGC) \
537 M(ShiftUint32Op, kNoGC) \
538 M(SpeculativeShiftUint32Op, kNoGC) \
539 M(UnaryUint32Op, kNoGC) \
541 M(UnboxUint32, kNoGC) \
543 M(UnboxInt32, kNoGC) \
544 M(BoxSmallInt, kNoGC) \
545 M(IntConverter, kNoGC) \
548 M(LoadThread, kNoGC) \
549 M(Deoptimize, kNoGC) \
553#define FOR_EACH_ABSTRACT_INSTRUCTION(M) \
555 M(ArrayAllocation, _) \
556 M(BinaryIntegerOp, _) \
559 M(CheckBoundBase, _) \
561 M(InstanceCallBase, _) \
563 M(ShiftIntegerOp, _) \
564 M(UnaryIntegerOp, _) \
567#define FORWARD_DECLARATION(type, attrs) class type##Instr;
570#undef FORWARD_DECLARATION
572#define DEFINE_INSTRUCTION_TYPE_CHECK(type) \
573 virtual type##Instr* As##type() { \
576 virtual const type##Instr* As##type() const { \
579 virtual const char* DebugName() const { \
584#define DECLARE_INSTRUCTION_NO_BACKEND(type) \
585 virtual Tag tag() const { \
588 virtual void Accept(InstructionVisitor* visitor); \
589 DEFINE_INSTRUCTION_TYPE_CHECK(type)
591#define DECLARE_INSTRUCTION_BACKEND() \
592 virtual LocationSummary* MakeLocationSummary(Zone* zone, bool optimizing) \
594 virtual void EmitNativeCode(FlowGraphCompiler* compiler);
597#define DECLARE_INSTRUCTION(type) \
598 DECLARE_INSTRUCTION_NO_BACKEND(type) \
599 DECLARE_INSTRUCTION_BACKEND()
602#define DECLARE_ABSTRACT_INSTRUCTION(type) \
605 virtual Tag tag() const = 0; \
606 DEFINE_INSTRUCTION_TYPE_CHECK(type)
608#define DECLARE_COMPARISON_METHODS \
609 virtual LocationSummary* MakeLocationSummary(Zone* zone, bool optimizing) \
611 virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler, \
612 BranchLabels labels);
614#define DECLARE_COMPARISON_INSTRUCTION(type) \
615 DECLARE_INSTRUCTION_NO_BACKEND(type) \
616 DECLARE_COMPARISON_METHODS
618template <
typename T,
bool is_enum>
623 using type = std::underlying_type_t<T>;
635#define WRITE_INSTRUCTION_FIELD(type, name) \
636 s->Write<serializable_type_t<type>>( \
637 static_cast<serializable_type_t<type>>(name));
638#define READ_INSTRUCTION_FIELD(type, name) \
639 , name(static_cast<std::remove_cv_t<type>>( \
640 d->Read<serializable_type_t<type>>()))
641#define DECLARE_INSTRUCTION_FIELD(type, name) type name;
649#define DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(Instr, BaseClass, FieldList) \
651 virtual void WriteTo(FlowGraphSerializer* s) { \
652 BaseClass::WriteTo(s); \
653 FieldList(WRITE_INSTRUCTION_FIELD) \
655 explicit Instr(FlowGraphDeserializer* d) \
656 : BaseClass(d) FieldList(READ_INSTRUCTION_FIELD) {} \
659 FieldList(DECLARE_INSTRUCTION_FIELD)
661#define DECLARE_CUSTOM_SERIALIZATION(Instr) \
663 virtual void WriteTo(FlowGraphSerializer* s); \
664 explicit Instr(FlowGraphDeserializer* d);
666#define DECLARE_EMPTY_SERIALIZATION(Instr, BaseClass) \
668 explicit Instr(FlowGraphDeserializer* d) : BaseClass(d) {}
670#define DECLARE_EXTRA_SERIALIZATION \
672 virtual void WriteExtra(FlowGraphSerializer* s); \
673 virtual void ReadExtra(FlowGraphDeserializer* d);
675#if defined(INCLUDE_IL_PRINTER)
676#define PRINT_TO_SUPPORT virtual void PrintTo(BaseTextBuffer* f) const;
677#define PRINT_OPERANDS_TO_SUPPORT \
678 virtual void PrintOperandsTo(BaseTextBuffer* f) const;
682#define PRINT_BLOCK_HEADER_TO_SUPPORT \
683 virtual void PrintBlockHeaderTo(BaseTextBuffer* f) const;
687#define DECLARE_ATTRIBUTE(Attribute) \
688 auto GetAttributes() const { \
689 return std::make_tuple(Attribute); \
691 static auto GetAttributeNames() { \
692 return std::make_tuple(#Attribute); \
696#define DECLARE_ATTRIBUTES_NAMED(names, values) \
697 auto GetAttributes() const { \
698 return std::make_tuple values; \
700 static auto GetAttributeNames() { \
701 return std::make_tuple names; \
704#define PRINT_TO_SUPPORT
705#define PRINT_OPERANDS_TO_SUPPORT
706#define PRINT_BLOCK_HEADER_TO_SUPPORT
707#define DECLARE_ATTRIBUTE(Attribute)
708#define DECLARE_ATTRIBUTES_NAMED(names, values)
717 intptr_t cid_end_arg,
721 :
CidRange(cid_start_arg, cid_end_arg),
745 int argument_number);
777 DISALLOW_IMPLICIT_CONSTRUCTORS(
Cids);
785 intptr_t receiver_cid,
818 if (j != kSmiCid && j != kMintCid) {
830 void CreateHelper(
Zone* zone,
const ICData& ic_data);
831 void MergeIntoRanges();
842 intptr_t receiver_cid,
843 intptr_t argument_cid);
849 for (intptr_t
i = 0, n = feedback_.
length();
i < n;
i++) {
850 if (feedback_[
i].second !=
cid) {
861 for (intptr_t
i = 0, n = feedback_.
length();
i < n;
i++) {
862 if ((feedback_[
i].first != cid_a) && (feedback_[
i].first != cid_b)) {
865 if ((feedback_[
i].second != cid_a) && (feedback_[
i].second != cid_b)) {
882 if (feedback_.
length() != 1)
return false;
883 return (feedback_[0].first ==
cid) && (feedback_[0].second ==
cid);
887 for (intptr_t
i = 0, n = feedback_.
length();
i < n;
i++) {
888 if ((feedback_[
i].first ==
cid) && (feedback_[
i].second ==
cid)) {
904template <
typename Trait>
964#define DECLARE_TAG(type, attrs) k##type,
1003 bool is_static_call);
1016 value->set_instruction(
this);
1080 return env() !=
nullptr &&
1097 ASSERT(!IsBranch() || (instr ==
nullptr));
1099 ASSERT(instr ==
nullptr || !instr->IsBlockEntry());
1161#define DECLARE_INSTRUCTION_TYPE_CHECK(Name, Type) \
1162 bool Is##Name() const { return (As##Name() != nullptr); } \
1163 Type* As##Name() { \
1164 auto const_this = static_cast<const Instruction*>(this); \
1165 return const_cast<Type*>(const_this->As##Name()); \
1167 virtual const Type* As##Name() const { return nullptr; }
1168#define INSTRUCTION_TYPE_CHECK(Name, Attrs) \
1169 DECLARE_INSTRUCTION_TYPE_CHECK(Name, Name##Instr)
1177#undef INSTRUCTION_TYPE_CHECK
1178#undef DECLARE_INSTRUCTION_TYPE_CHECK
1180 template <
typename T>
1182 return static_cast<T*
>(
this);
1185 template <
typename T>
1187 return static_cast<const T*
>(
this);
1193 ASSERT(locs_ !=
nullptr);
1200 bool is_optimizing)
const = 0;
1203 ASSERT(locs_ ==
nullptr);
1225 return (PassSpecificId::DecodePass(pass_specific_id_) == pass)
1226 ? PassSpecificId::DecodeId(pass_specific_id_)
1227 : PassSpecificId::kNoId;
1233 return (PassSpecificId::DecodePass(pass_specific_id_) == pass) &&
1234 (PassSpecificId::DecodeId(pass_specific_id_) !=
1235 PassSpecificId::kNoId);
1315 inlining_id_ =
value;
1369#if defined(TARGET_ARCH_IA32)
1372 return FLAG_enable_slow_path_sharing && FLAG_precompiled_mode &&
1386 if ((rep == kUnboxedFloat) || (rep == kUnboxedDouble) ||
1387 (rep == kUnboxedFloat32x4) || (rep == kUnboxedInt32x4) ||
1388 (rep == kUnboxedFloat64x2)) {
1412 deopt_id_ = instr.deopt_id_;
1428 class PassSpecificId {
1431 return (
id << kPassBits) | pass;
1438 static intptr_t DecodeId(intptr_t
value) {
return (
value >> kPassBits); }
1440 static constexpr intptr_t kNoId = -1;
1443 static constexpr intptr_t kPassBits = 8;
1445 "Pass Id does not fit into the bit field");
1449 intptr_t pass_specific_id_ = PassSpecificId::kNoId;
1454 intptr_t inlining_id_;
1489template <
typename DefaultBase,
typename PureBase>
1494template <
typename DefaultBase,
typename PureBase>
1499template <intptr_t
N,
1500 typename ThrowsTrait,
1501 template <
typename Default,
typename Pure>
class CSETrait =
NoCSE>
1503 :
public CSETrait<Instruction, PureInstruction>::Base {
1505 using BaseClass =
typename CSETrait<Instruction, PureInstruction>::Base;
1517 virtual bool MayThrow()
const {
return ThrowsTrait::kCanThrow; }
1535 dest_ = other.dest_;
1622 return TokenPosition::kParallelMove;
1626 ASSERT(move_schedule_ !=
nullptr);
1627 return *move_schedule_;
1631 move_schedule_ = &schedule;
1674 return dominated_blocks_;
1678 ASSERT(!block->IsFunctionEntry() || this->IsGraphEntry());
1679 block->set_dominator(
this);
1680 dominated_blocks_.Add(block);
1698 if (parallel_move_ ==
nullptr) {
1701 return parallel_move_;
1745 return TokenPosition::kControlFlow;
1790 dominated_blocks_(1) {}
1805 intptr_t try_index_;
1806 intptr_t preorder_number_ = -1;
1807 intptr_t postorder_number_ = -1;
1809 intptr_t stack_depth_;
1812 intptr_t start_pos_ = -1;
1813 intptr_t end_pos_ = -1;
1839 : current_(block_entry) {
1845 current_ = current_->
next();
1848 bool Done()
const {
return current_ ==
nullptr; }
1858 return current_ == other.current_;
1862 return !(*
this == other);
1887 ASSERT(block_entry_->previous() ==
nullptr);
1892 current_ = current_->previous();
1895 bool Done()
const {
return current_ == block_entry_; }
1897 void RemoveCurrentFromGraph();
1918 return &initial_definitions_;
1921 return &initial_definitions_;
1971 indirect_entries_.Add(entry);
1976 void RelinkToOsrEntry(
Zone* zone, intptr_t max_block_id);
1977 bool IsCompiledForOsr()
const;
1986 spill_slot_count_ =
count;
1999 fixed_slot_count_ =
count;
2005 unchecked_entry_ =
target;
2013 return catch_entries_;
2017 return indirect_entries_;
2021 return catch_entries().is_empty() && unchecked_entry() ==
nullptr;
2043 const intptr_t osr_id_;
2044 intptr_t entry_count_;
2045 intptr_t spill_slot_count_;
2046 intptr_t fixed_slot_count_;
2047 bool needs_frame_ =
true;
2067 return predecessors_[index];
2075 PhiInstr* InsertPhi(intptr_t var_index, intptr_t var_count);
2076 void RemoveDeadPhis(
Definition* replacement);
2085#define FIELD_LIST(F) F(ZoneGrowableArray<PhiInstr*>*, phis_)
2122 return (phis_ ==
nullptr) || (index_ >= phis_->length());
2128 void RemoveCurrentFromGraph();
2142 edge_weight_(0.0) {}
2146 double edge_weight()
const {
return edge_weight_; }
2151 return (predecessor_ ==
nullptr) ? 0 : 1;
2154 ASSERT((index == 0) && (predecessor_ !=
nullptr));
2155 return predecessor_;
2160#define FIELD_LIST(F) F(double, edge_weight_)
2171 ASSERT(predecessor_ ==
nullptr);
2172 predecessor_ = predecessor;
2200 graph_entry_(graph_entry) {}
2205 return (graph_entry_ ==
nullptr) ? 0 : 1;
2208 ASSERT(index == 0 && graph_entry_ !=
nullptr);
2209 return graph_entry_;
2220 ASSERT(graph_entry_ ==
nullptr && predecessor->IsGraphEntry());
2221 graph_entry_ = predecessor->AsGraphEntry();
2235 static constexpr intptr_t kVMTagOffsetFromFp =
2244 marshaller_(marshaller) {}
2250#define FIELD_LIST(F) F(const compiler::ffi::CallbackMarshaller&, marshaller_)
2274 graph_entry_(graph_entry) {}
2279 return (graph_entry_ ==
nullptr) ? 0 : 1;
2282 ASSERT(index == 0 && graph_entry_ !=
nullptr);
2283 return graph_entry_;
2294 ASSERT(graph_entry_ ==
nullptr && predecessor->IsGraphEntry());
2295 graph_entry_ = predecessor->AsGraphEntry();
2306 intptr_t indirect_id,
2310 indirect_id_(indirect_id) {}
2314 intptr_t indirect_id()
const {
return indirect_id_; }
2318#define FIELD_LIST(F) F(const intptr_t, indirect_id_)
2332 const Array& handler_types,
2333 intptr_t catch_try_index,
2334 bool needs_stacktrace,
2344 graph_entry_(graph_entry),
2345 predecessor_(nullptr),
2346 catch_handler_types_(
Array::ZoneHandle(handler_types.ptr())),
2347 catch_try_index_(catch_try_index),
2348 exception_var_(exception_var),
2349 stacktrace_var_(stacktrace_var),
2350 raw_exception_var_(raw_exception_var),
2351 raw_stacktrace_var_(raw_stacktrace_var),
2352 needs_stacktrace_(needs_stacktrace),
2353 is_generated_(is_generated) {}
2358 return (predecessor_ ==
nullptr) ? 0 : 1;
2361 ASSERT((index == 0) && (predecessor_ !=
nullptr));
2362 return predecessor_;
2372 return raw_stacktrace_var_;
2393 ASSERT(predecessor_ ==
nullptr);
2394 predecessor_ = predecessor;
2399 const Array& catch_handler_types_;
2400 const intptr_t catch_try_index_;
2405 const bool needs_stacktrace_;
2431#define FOR_EACH_ALIAS_IDENTITY_VALUE(V) \
2435 V(AllocationSinkingCandidate, 3)
2439#define VALUE_CASE(name, val) \
2454 return value_ == kAllocationSinkingCandidate;
2461 value_ = other.value_;
2471#define VALUE_DEFN(name, val) k##name = val,
2476#undef FOR_EACH_ALIAS_IDENTITY_VALUE
2480 COMPILE_ASSERT((kAllocationSinkingCandidate & kNotAliased) != 0);
2506 ssa_temp_index_ = index;
2511 intptr_t
vreg(intptr_t index)
const {
2512 ASSERT((index >= 0) && (index < location_count()));
2513 if (ssa_temp_index_ == -1)
return -1;
2522 if (type_ ==
nullptr) {
2524 type->set_owner(
this);
2530 bool HasType()
const {
return (type_ !=
nullptr); }
2532 inline bool IsInt64Definition();
2535 return IsBinaryInt32Op() || IsBoxInt32() || IsUnboxInt32() ||
2554 if (type_ ==
nullptr) {
2556 type->set_owner(
this);
2561 if (type_->IsNone() || !type_->IsEqualTo(&new_type)) {
2570 return (input_use_list_ !=
nullptr) || (env_use_list_ !=
nullptr);
2572 bool HasOnlyUse(
Value* use)
const;
2573 bool HasOnlyInputUse(
Value* use)
const;
2606 return CanReplaceWithConstant();
2632 Object& constant_value();
2637 void set_range(
const Range&);
2644 static constexpr intptr_t kReplacementMarker = -2;
2647 if (ssa_temp_index_ == kReplacementMarker) {
2648 return reinterpret_cast<Definition*
>(temp_index_);
2654 ASSERT(ssa_temp_index_ >= 0);
2656 ssa_temp_index_ = kReplacementMarker;
2657 temp_index_ =
reinterpret_cast<intptr_t
>(other);
2672 virtual Value* RedefinedValue()
const;
2678 Definition* OriginalDefinitionIgnoreBoxingAndConstraints();
2699#if defined(INCLUDE_IL_PRINTER)
2700 const char* TypeAsCString()
const {
2701 return HasType() ? type_->ToCString() :
"";
2706 intptr_t temp_index_ = -1;
2707 intptr_t ssa_temp_index_ = -1;
2708 Value* input_use_list_ =
nullptr;
2709 Value* env_use_list_ =
nullptr;
2711 Object* constant_value_ =
nullptr;
2712 CompileType* type_ =
nullptr;
2719 RemoveFromUseList();
2720 set_definition(def);
2725 RemoveFromUseList();
2726 set_definition(def);
2742template <intptr_t
N,
2743 typename ThrowsTrait,
2744 template <
typename Impure,
typename Pure>
class CSETrait = NoCSE>
2747 using BaseClass =
typename CSETrait<Definition, PureDefinition>::Base;
2758 virtual bool MayThrow()
const {
return ThrowsTrait::kCanThrow; }
2776 for (intptr_t
i = 0, n =
inputs_.length();
i < n; ++
i) {
2784 for (intptr_t
i = 0, n =
inputs_.length();
i < n; ++
i) {
2791 inputs_.EnsureLength(num_inputs,
nullptr);
2811 representation_(kTagged),
2813 is_receiver_(kUnknownReceiver) {}
2820 virtual bool RecomputeType();
2832 return representation_;
2849 (representation_ != kUnboxedInt32))
2866 reaching_defs_ = reaching_defs;
2872 bool IsRedundant()
const;
2877 Definition* GetReplacementForRedundantPhi()
const;
2884 enum
ReceiverType { kUnknownReceiver = -1, kNotReceiver = 0, kReceiver = 1 };
2901 int8_t is_receiver_;
2922 static constexpr intptr_t kNotFunctionParameter = -1;
2926 intptr_t param_index,
2929 : env_index_(env_index),
2930 param_index_(param_index),
2939 intptr_t env_index()
const {
return env_index_; }
2940 intptr_t
index()
const {
return env_index(); }
2972#define FIELD_LIST(F) \
2973 F(const intptr_t, env_index_) \
2974 F(const intptr_t, param_index_) \
2975 F(const Representation, representation_)
3001 : marshaller_(marshaller), def_index_(def_index) {}
3006 return marshaller_.RepInFfiCall(def_index_);
3021#define FIELD_LIST(F) \
3022 F(const compiler::ffi::CallbackMarshaller&, marshaller_) \
3023 F(const intptr_t, def_index_)
3055 enum { kIndexPos = 0, kValuePos = 1 };
3060 ASSERT(index == kIndexPos || index == kValuePos);
3068 return other.AsStoreIndexedUnsafe()->offset() ==
offset();
3078#define FIELD_LIST(F) F(const intptr_t, offset_)
3108 UpdateType(result_type);
3122 return other.AsLoadIndexedUnsafe()->offset() ==
offset();
3133#define FIELD_LIST(F) \
3134 F(const intptr_t, offset_) \
3135 F(const Representation, representation_)
3155 bool unboxed_inputs,
3156 bool can_overlap =
true)
3157 : src_cid_(src_cid),
3158 dest_cid_(dest_cid),
3159 element_size_(
Instance::ElementSizeFor(src_cid)),
3160 unboxed_inputs_(unboxed_inputs),
3161 can_overlap_(can_overlap) {
3162 ASSERT(IsArrayTypeSupported(src_cid));
3163 ASSERT(IsArrayTypeSupported(dest_cid));
3184 if (index == kSrcPos || index == kDestPos) {
3186 return kNoRepresentation;
3188 ASSERT(index <= kLengthPos);
3196 if (
auto*
const copy = other.AsMemoryCopy()) {
3197 if (element_size_ !=
copy->element_size_)
return false;
3198 if (unboxed_inputs_ !=
copy->unboxed_inputs_)
return false;
3199 if (can_overlap_ !=
copy->can_overlap_)
return false;
3200 if (src_cid_ !=
copy->src_cid_)
return false;
3201 if (dest_cid_ !=
copy->dest_cid_)
return false;
3226#define FIELD_LIST(F) \
3227 F(const classid_t, src_cid_) \
3228 F(const classid_t, dest_cid_) \
3229 F(intptr_t, element_size_) \
3230 F(bool, unboxed_inputs_) \
3231 F(const bool, can_overlap_)
3256 intptr_t num_elements,
3291 if (array_cid == kPointerCid || array_cid == kStringCid)
return false;
3319 return &other.AsTailCall()->code() == &
code();
3329#define FIELD_LIST(F) F(const Code&, code_)
3353 is_register_move_(IsRegisterMove(location)),
3354 location_(location) {
3355 ASSERT(IsSupportedLocation(location));
3361 bool is_register_move()
const {
return is_register_move_; }
3366 ASSERT(!is_register_move());
3384 return TokenPosition::kMoveArgument;
3396#define FIELD_LIST(F) \
3397 F(const Representation, representation_) \
3398 F(const bool, is_register_move_)
3408 static bool IsSupportedLocation(
Location loc,
bool can_be_fpu_value =
true) {
3409#if defined(TARGET_ARCH_IS_32_BIT)
3412 return IsSupportedLocation(pair_loc->At(0),
false) &&
3413 IsSupportedLocation(pair_loc->At(1),
false);
3437 return move_arguments !=
nullptr ? (*move_arguments)[index]->value()
3495 auto const other_return = other.AsDartReturn();
3496 return token_pos() == other_return->token_pos();
3505 return representation_;
3512#define FIELD_LIST(F) \
3513 F(const TokenPosition, token_pos_) \
3514 F(const Representation, representation_)
3572 return marshaller_.NumReturnDefinitions();
3576 auto const other_return = other.AsNativeReturn();
3577 return token_pos() == other_return->token_pos();
3582#define FIELD_LIST(F) F(const compiler::ffi::CallbackMarshaller&, marshaller_)
3621#define FIELD_LIST(F) F(const TokenPosition, token_pos_)
3637 intptr_t catch_try_index,
3643 catch_try_index_(catch_try_index) {
3662#define FIELD_LIST(F) \
3663 F(const TokenPosition, token_pos_) \
3664 F(const intptr_t, catch_try_index_)
3689#define FIELD_LIST(F) F(const char*, message_)
3705 parallel_move_(nullptr),
3706 successor_(entry) {}
3744 if (parallel_move_ ==
nullptr) {
3747 return parallel_move_;
3751 return TokenPosition::kControlFlow;
3756#define FIELD_LIST(F) \
3757 F(double, edge_weight_) \
3760 F(ParallelMoveInstr*, parallel_move_)
3814 ASSERT(successor->
next()->AsGoto()->successor()->IsIndirectEntry());
3815 successors_.Add(successor);
3821 return successors_[index];
3886 auto const other_comparison = other.AsComparison();
3887 return kind() == other_comparison->kind() &&
3888 (operation_cid() == other_comparison->operation_cid());
3895 if (right()->BindsToConstant(constant_operand)) {
3896 *other_operand = left();
3898 }
else if (left()->BindsToConstant(constant_operand)) {
3899 *other_operand = right();
3908#define FIELD_LIST(F) \
3909 F(const TokenPosition, token_pos_) \
3910 F(Token::Kind, kind_) \
3912 F(intptr_t, operation_cid_)
3945template <intptr_t
N,
3946 typename ThrowsTrait,
3947 template <
typename Impure,
typename Pure>
class CSETrait = NoCSE>
3949 :
public CSETrait<ComparisonInstr, PureComparison>::Base {
3951 using BaseClass =
typename CSETrait<ComparisonInstr, PureComparison>::Base;
3961 virtual bool MayThrow()
const {
return ThrowsTrait::kCanThrow; }
3977 for (intptr_t
i = comparison->
InputCount() - 1;
i >= 0; --
i) {
3985 return comparison()->ArgumentCount();
3988 comparison()->SetMoveArguments(move_arguments);
3991 return comparison()->GetMoveArguments();
3994 intptr_t
InputCount()
const {
return comparison()->InputCount(); }
3999 virtual intptr_t
inlining_id()
const {
return comparison_->inlining_id(); }
4001 return comparison_->set_inlining_id(
value);
4004 return comparison_->has_inlining_id();
4008 return comparison()->ComputeCanDeoptimize();
4012 return comparison()->CanBecomeDeoptimizationTarget();
4016 return comparison()->HasUnknownSideEffects();
4019 virtual bool CanCallDart()
const {
return comparison()->CanCallDart(); }
4025 return comparison()->DeoptimizationTarget();
4029 return comparison()->RequiredInputRepresentation(
i);
4036 constant_target_ =
target;
4042 comparison()->CopyDeoptIdFrom(instr);
4045 virtual bool MayThrow()
const {
return comparison()->MayThrow(); }
4058#define FIELD_LIST(F) F(ComparisonInstr*, comparison_)
4066 comparison()->RawSetInputAt(
i,
value);
4087#define FIELD_LIST(F) F(const ICData::DeoptReasonId, deopt_reason_)
4101 bool inserted_by_constant_propagation =
false)
4102 : constrained_type_(nullptr),
4103 inserted_by_constant_propagation_(inserted_by_constant_propagation) {
4112 virtual bool RecomputeType();
4120 return inserted_by_constant_propagation_;
4126 virtual Value* RedefinedValue()
const;
4130#define FIELD_LIST(F) \
4131 F(CompileType*, constrained_type_) \
4132 F(bool, inserted_by_constant_propagation_)
4153 return kNoRepresentation;
4205#define FIELD_LIST(F) F(Range*, constraint_)
4238 case kUnboxedUint16:
4239 case kUnboxedUint32:
4243 case kUnboxedDouble:
4262 intptr_t pair_index = 0);
4267#define FIELD_LIST(F) \
4268 F(const Object&, value_) \
4269 F(const TokenPosition, token_pos_)
4313 kInstantiatorTAVPos = 0,
4314 kFunctionTAVPos = 1,
4321 Value* instantiator_type_arguments,
4322 Value* function_type_arguments,
4328 SetInputAt(kInstantiatorTAVPos, instantiator_type_arguments);
4329 SetInputAt(kFunctionTAVPos, function_type_arguments);
4338 return inputs_[kInstantiatorTAVPos];
4363#define FIELD_LIST(F) F(const TokenPosition, token_pos_)
4376#define FOR_EACH_ASSERT_ASSIGNABLE_KIND(V) \
4378 V(InsertedByFrontend) \
4382#define KIND_DEFN(name) k##name,
4386 static const char* KindToCString(
Kind kind);
4387 static bool ParseKind(
const char* str,
Kind*
out);
4392 kInstantiatorTAVPos = 2,
4393 kFunctionTAVPos = 3,
4400 Value* instantiator_type_arguments,
4401 Value* function_type_arguments,
4404 Kind kind = kUnknown)
4407 dst_name_(dst_name),
4412 SetInputAt(kInstantiatorTAVPos, instantiator_type_arguments);
4413 SetInputAt(kFunctionTAVPos, function_type_arguments);
4420 virtual bool RecomputeType();
4425 return inputs_[kInstantiatorTAVPos];
4437#if !defined(TARGET_ARCH_IA32)
4458 virtual Value* RedefinedValue()
const;
4464#define FIELD_LIST(F) \
4465 F(const TokenPosition, token_pos_) \
4466 F(const String&, dst_name_) \
4467 F(const Kind, kind_)
4505 virtual Value* RedefinedValue()
const;
4509#define FIELD_LIST(F) F(const TokenPosition, token_pos_)
4522 intptr_t count_with_type_args,
4523 intptr_t size_with_type_args,
4524 const Array& argument_names)
4525 : type_args_len(type_args_len),
4526 count_with_type_args(count_with_type_args),
4527 size_with_type_args(size_with_type_args),
4528 count_without_type_args(count_with_type_args -
4529 (type_args_len > 0 ? 1 : 0)),
4530 size_without_type_args(size_with_type_args -
4531 (type_args_len > 0 ? 1 : 0)),
4532 argument_names(argument_names) {}
4536 size_without_type_args, argument_names);
4547template <
intptr_t kExtraInputs>
4551 intptr_t type_args_len,
4552 const Array& argument_names,
4556 type_args_len_(type_args_len),
4557 argument_names_(argument_names),
4559 DEBUG_ASSERT(argument_names.IsNotTemporaryScopedHandle());
4573 return kExtraInputs;
4582 return ArgumentsSize() - FirstArgIndex();
4587 return move_arguments_ !=
nullptr ? move_arguments_->length()
4593 ASSERT(move_arguments_ ==
nullptr);
4594 move_arguments_ = move_arguments;
4597 return move_arguments_;
4601 ASSERT(move_arguments_ ==
nullptr);
4605 const intptr_t extra_inputs_base =
InputCount() - kExtraInputs;
4609 for (intptr_t
i = 0;
i < kExtraInputs; ++
i) {
4612 inputs_.TruncateTo(kExtraInputs);
4619 type_args_len(), ArgumentCountWithoutTypeArgs(),
4620 ArgumentsSizeWithoutTypeArgs(), argument_names());
4627 const intptr_t type_args_len_;
4628 const Array& argument_names_;
4639 intptr_t type_args_len,
4640 const Array& argument_names,
4648 target_function_(target_function) {
4649 DEBUG_ASSERT(target_function.IsNotTemporaryScopedHandle());
4654 const
Function& target_function()
const {
return target_function_; }
4663#define FIELD_LIST(F) F(const Function&, target_function_)
4681 intptr_t type_args_len,
4682 const Array& argument_names,
4686 const Function& tearoff_interface_target)
4690 std::move(arguments),
4694 token_kind_(token_kind),
4695 interface_target_(interface_target),
4696 tearoff_interface_target_(tearoff_interface_target),
4697 result_type_(nullptr),
4698 has_unique_selector_(
false),
4700 receiver_is_not_smi_(
false),
4701 is_call_on_this_(
false) {
4703 DEBUG_ASSERT(interface_target.IsNotTemporaryScopedHandle());
4704 DEBUG_ASSERT(tearoff_interface_target.IsNotTemporaryScopedHandle());
4713 token_kind == Token::kSET || token_kind == Token::kILLEGAL);
4718 return (ic_data() !=
nullptr) && !ic_data()->IsNull();
4728 return tearoff_interface_target_;
4751 if (result_type_ ==
nullptr) {
4754 return result_type_->ToCid();
4757 FunctionPtr ResolveForReceiverClass(
const Class& cls,
bool allow_add =
true);
4772 void UpdateReceiverSminess(
Zone* zone);
4774 bool CanReceiverBeSmiBasedOnInterfaceTarget(
Zone* zone)
const;
4777 if (type_args_len() > 0) {
4784 return interface_target_.is_unboxed_parameter_at(idx) ?
kNotSpeculative
4788 virtual intptr_t ArgumentsSize()
const;
4796#define FIELD_LIST(F) \
4797 F(const ICData*, ic_data_) \
4798 F(const String&, function_name_) \
4800 F(const Token::Kind, token_kind_) \
4801 F(const Function&, interface_target_) \
4802 F(const Function&, tearoff_interface_target_) \
4804 F(CompileType*, result_type_) \
4805 F(bool, has_unique_selector_) \
4806 F(Code::EntryKind, entry_kind_) \
4807 F(bool, receiver_is_not_smi_) \
4808 F(bool, is_call_on_this_)
4831 intptr_t type_args_len,
4832 const Array& argument_names,
4833 intptr_t checked_argument_count,
4836 const Function& interface_target = Function::null_function(),
4837 const Function& tearoff_interface_target = Function::null_function())
4842 std::move(arguments),
4848 tearoff_interface_target),
4849 checked_argument_count_(checked_argument_count),
4850 receivers_static_type_(nullptr) {}
4857 intptr_t type_args_len,
4858 const Array& argument_names,
4859 intptr_t checked_argument_count,
4861 const Function& interface_target = Function::null_function(),
4862 const Function& tearoff_interface_target = Function::null_function())
4866 std::move(arguments),
4872 tearoff_interface_target),
4873 checked_argument_count_(checked_argument_count),
4874 receivers_static_type_(nullptr) {}
4878 intptr_t checked_argument_count()
const {
return checked_argument_count_; }
4881 return ic_data() ==
nullptr ? 0 : ic_data()->AggregateCount();
4885 ASSERT(receiver_type !=
nullptr);
4886 receivers_static_type_ = receiver_type;
4905#define FIELD_LIST(F) \
4906 F(const intptr_t, checked_argument_count_) \
4907 F(const AbstractType*, receivers_static_type_)
4930 for (intptr_t
i = 0, n =
call->ArgumentCount();
i < n; ++
i) {
4931 args.Add(
call->ArgumentValueAt(
i)->CopyWithType(zone));
4934 call->source(),
call->function_name(),
call->token_kind(),
4935 std::move(
args),
call->type_args_len(),
call->argument_names(),
4936 call->ic_data(),
call->deopt_id(),
call->interface_target(),
4937 call->tearoff_interface_target(), targets, complete);
4939 new_call->set_entry_kind(
call->entry_kind());
4940 new_call->set_has_unique_selector(
call->has_unique_selector());
4941 if (
call->is_call_on_this()) {
4942 new_call->mark_as_call_on_this();
4951 bool HasOnlyDispatcherOrImplicitAccessorTargets()
const;
4956 bool IsSureToCallSingleRecognizedTarget()
const;
4958 virtual intptr_t CallCount()
const;
4975 static TypePtr ComputeRuntimeType(
const CallTargets& targets);
4979#define FIELD_LIST(F) \
4980 F(const CallTargets&, targets_) \
4981 F(const bool, complete_) \
4982 F(intptr_t, total_call_count_)
4994 intptr_t type_args_len,
4995 const Array& argument_names,
4999 const Function& tearoff_interface_target,
5005 std::move(arguments),
5011 tearoff_interface_target),
5013 complete_(complete) {
5015 total_call_count_ = CallCount();
5032 intptr_t type_args_len,
5033 const Array& argument_names)
5037 std::move(arguments),
5039 interface_target_(interface_target),
5040 selector_(selector) {
5041 ASSERT(selector !=
nullptr);
5042 DEBUG_ASSERT(interface_target_.IsNotTemporaryScopedHandle());
5056 const
Function& interface_target()
const {
return interface_target_; }
5075 if (type_args_len() > 0) {
5081 return interface_target_.is_unboxed_parameter_at(idx) ?
kNotSpeculative
5085 virtual intptr_t ArgumentsSize()
const;
5093#define FIELD_LIST(F) \
5094 F(const Function&, interface_target_) \
5095 F(const compiler::TableSelector*, selector_)
5112 bool needs_number_check,
5132#define FIELD_LIST(F) \
5135 F(bool, needs_number_check_)
5149 intptr_t input_index,
5166 ASSERT(kind == Token::kEQ || kind == Token::kNE);
5181 return representation_;
5191#if defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_ARM64) || \
5192 defined(TARGET_ARCH_RISCV64)
5202#if defined(TARGET_ARCH_ARM64)
5206#define FIELD_LIST(F) F(const Representation, representation_)
5214 int64_t ComputeImmediateMask();
5235 return cid_results_;
5259#define FIELD_LIST(F) F(const ZoneGrowableArray<intptr_t>&, cid_results_)
5293 return value_representation_;
5300#define FIELD_LIST(F) \
5301 F(const uword, lower_) \
5302 F(const uword, upper_) \
5303 F(const Representation, value_representation_)
5322 bool null_aware =
false,
5325 null_aware_(null_aware),
5326 speculative_mode_(speculative_mode) {
5330 set_operation_cid(
cid);
5345 ASSERT((idx == 0) || (idx == 1));
5346 if (is_null_aware())
return kTagged;
5347 if (operation_cid() == kDoubleCid)
return kUnboxedDouble;
5348 if (operation_cid() == kMintCid)
return kUnboxedInt64;
5354 return speculative_mode_;
5359 (null_aware_ == other.AsEqualityCompare()->null_aware_) &&
5360 (speculative_mode_ == other.AsEqualityCompare()->speculative_mode_);
5367#define FIELD_LIST(F) \
5368 F(bool, null_aware_) \
5369 F(const SpeculativeMode, speculative_mode_)
5390 speculative_mode_(speculative_mode) {
5394 set_operation_cid(
cid);
5406 ASSERT((idx == 0) || (idx == 1));
5407 if (operation_cid() == kDoubleCid)
return kUnboxedDouble;
5408 if (operation_cid() == kMintCid)
return kUnboxedInt64;
5413 return speculative_mode_;
5418 (speculative_mode_ == other.AsRelationalOp()->speculative_mode_);
5423#define FIELD_LIST(F) F(const SpeculativeMode, speculative_mode_)
5443 comparison_(comparison),
5445 if_false_(
Smi::
Cast(if_false->BoundConstant()).
Value()) {
5448 for (intptr_t
i = comparison->
InputCount() - 1;
i >= 0; --
i) {
5459 intptr_t
InputCount()
const {
return comparison()->InputCount(); }
5464 return comparison()->ComputeCanDeoptimize();
5468 return comparison()->CanBecomeDeoptimizationTarget();
5472 return comparison()->DeoptimizationTarget();
5476 return comparison()->RequiredInputRepresentation(
i);
5487 virtual bool AllowsCSE()
const {
return comparison()->AllowsCSE(); }
5489 return comparison()->HasUnknownSideEffects();
5491 virtual bool CanCallDart()
const {
return comparison()->CanCallDart(); }
5494 auto const other_if_then_else = other.AsIfThenElse();
5495 return (comparison()->
tag() == other_if_then_else->comparison()->tag()) &&
5497 (if_true_ == other_if_then_else->if_true_) &&
5498 (if_false_ == other_if_then_else->if_false_);
5501 virtual bool MayThrow()
const {
return comparison()->MayThrow(); }
5505 comparison()->CopyDeoptIdFrom(instr);
5510#define FIELD_LIST(F) \
5511 F(ComparisonInstr*, comparison_) \
5512 F(const intptr_t, if_true_) \
5513 F(const intptr_t, if_false_)
5523 comparison()->RawSetInputAt(
i,
value);
5533 intptr_t type_args_len,
5534 const Array& argument_names,
5542 std::move(arguments),
5547 rebind_rule_(rebind_rule),
5548 result_type_(nullptr),
5549 is_known_list_constructor_(
false),
5558 intptr_t type_args_len,
5559 const Array& argument_names,
5562 intptr_t call_count,
5567 std::move(arguments),
5570 call_count_(call_count),
5572 rebind_rule_(rebind_rule),
5573 result_type_(nullptr),
5574 is_known_list_constructor_(
false),
5587 intptr_t call_count) {
5590 for (intptr_t
i = 0;
i <
call->ArgumentCount();
i++) {
5591 args.Add(
call->ArgumentValueAt(
i)->CopyWithType());
5595 std::move(
args),
call->deopt_id(), call_count, ICData::kNoRebind);
5596 if (
call->result_type() !=
nullptr) {
5597 new_call->result_type_ =
call->result_type();
5606 return (ic_data() !=
nullptr) && !ic_data()->IsNull();
5626 return ic_data() ==
nullptr ? call_count_ : ic_data()->AggregateCount();
5646 bool InitResultType(
Zone* zone);
5655 if (result_type_ ==
nullptr) {
5658 return result_type_->ToCid();
5663 is_known_list_constructor_ =
value;
5673 if (type_args_len() > 0 ||
function().IsFactory()) {
5683 virtual intptr_t ArgumentsSize()
const;
5699#define FIELD_LIST(F) \
5700 F(const ICData*, ic_data_) \
5701 F(const intptr_t, call_count_) \
5702 F(const Function&, function_) \
5703 F(const ICData::RebindRule, rebind_rule_) \
5705 F(CompileType*, result_type_) \
5707 F(bool, is_known_list_constructor_) \
5708 F(Code::EntryKind, entry_kind_) \
5709 F(AliasIdentity, identity_)
5739 intptr_t type_args_len,
5740 const Array& argument_names,
5768 if (type_args_len() > 0) {
5778 virtual intptr_t ArgumentsSize()
const;
5789#define FIELD_LIST(F) \
5790 F(const Representation, representation_) \
5791 F(const Function&, function_) \
5792 F(AliasIdentity, identity_)
5830#define FIELD_LIST(F) \
5831 F(const LocalVariable&, local_) \
5833 F(const TokenPosition, token_pos_)
5847 : num_temps_(num_temps), has_input_(
value != nullptr) {
5855 virtual intptr_t
InputCount()
const {
return has_input_ ? 1 : 0; }
5857 ASSERT(has_input_ && (
i == 0));
5880#define FIELD_LIST(F) \
5881 F(const intptr_t, num_temps_) \
5882 F(const bool, has_input_)
5934#define FIELD_LIST(F) F(ConstantInstr*, null_)
5982#define FIELD_LIST(F) \
5983 F(const LocalVariable&, local_) \
5986 F(const TokenPosition, token_pos_)
6006 Array::null_array(),
6012 link_lazily_(link_lazily) {
6022 const
String& native_name()
const {
return native_name_; }
6041#define FIELD_LIST(F) \
6042 F(const String&, native_name_) \
6043 F(const Function&, function_) \
6044 F(const TokenPosition, token_pos_)
6053 native_c_function_ =
value;
6062 bool is_bootstrap_native_ =
false;
6063 bool is_auto_scope_ =
true;
6064 bool link_lazily_ =
true;
6085 marshaller_(marshaller),
6092 ASSERT(!
InputAt(
i)->definition()->MayCreateUnsafeUntaggedPointer());
6100 intptr_t TargetAddressIndex()
const {
6101 return marshaller_.NumArgumentDefinitions();
6106 ASSERT(marshaller_.ReturnsCompound());
6107 return marshaller_.NumArgumentDefinitions() + 1;
6143 return FLAG_precompiled_mode;
6154#define FIELD_LIST(F) \
6155 F(const compiler::ffi::CallMarshaller&, marshaller_) \
6199 return argument_representations_.length();
6211 if (idx < argument_representations_.length()) {
6212 return argument_representations_.At(idx);
6225 for (intptr_t
i = 0;
i < TargetAddressIndex();
i++) {
6234 return return_representation_;
6273 stub_kind_(stub_kind) {}
6282#define FIELD_LIST(F) \
6283 F(const TokenPosition, token_pos_) \
6284 F(const UntaggedPcDescriptors::Kind, stub_kind_)
6350 Kind kind = Kind::kOther,
6355 emit_store_barrier_(emit_store_barrier),
6356 memory_order_(memory_order),
6358 is_initialization_(kind ==
Kind::kInitializing),
6359 stores_inner_pointer_(stores_inner_pointer) {
6360 switch (stores_inner_pointer) {
6382 Kind kind = Kind::kOther,
6401 Kind kind = Kind::kOther)
6418 (&slot(), is_initialization()))
6420 enum { kInstancePos = 0, kValuePos = 1 };
6430 if (slot().has_untagged_instance()) {
6439 if (
value()->definition()->
Type()->IsBool()) {
6442 return value()->NeedsWriteBarrier() &&
6447 emit_store_barrier_ =
value;
6451 return stores_inner_pointer_;
6458 stores_inner_pointer_ =
value;
6481#define FIELD_LIST(F) \
6482 F(const Slot&, slot_) \
6483 F(StoreBarrierType, emit_store_barrier_) \
6484 F(compiler::Assembler::MemoryOrder, memory_order_) \
6485 F(const TokenPosition, token_pos_) \
6487 F(const bool, is_initialization_) \
6488 F(InnerPointerAccess, stores_inner_pointer_)
6530#define FIELD_LIST(F) F(const Field&, field_)
6604template <
intptr_t N>
6610 bool calls_initializer =
false,
6612 const Field* field =
nullptr)
6615 throw_exception_on_initialization_(
6616 field != nullptr && !field->has_initializer() && field->is_late()),
6617 calls_initializer_(calls_initializer) {
6618 ASSERT(!calls_initializer || field !=
nullptr);
6627 return throw_exception_on_initialization_;
6632 return Base::SlowPathSharingSupported(is_optimizing);
6641 return Base::InputCount();
6645 return calls_initializer() && !throw_exception_on_initialization();
6656 virtual bool MayThrow()
const {
return calls_initializer(); }
6658#define FIELD_LIST(F) \
6659 F(const TokenPosition, token_pos_) \
6660 F(const bool, throw_exception_on_initialization_) \
6661 F(bool, calls_initializer_)
6674 bool calls_initializer =
false,
6693 return field().is_final() &&
6694 (!field().is_late() || field().has_initializer());
6701#define FIELD_LIST(F) F(const Field&, field_)
6725 enum { kValuePos = 0 };
6729 const
Field& field()
const {
return field_; }
6745#define FIELD_LIST(F) \
6746 F(const Field&, field_) \
6747 F(const TokenPosition, token_pos_)
6774 intptr_t index_scale,
6781 enum { kArrayPos = 0, kIndexPos = 1 };
6787 virtual bool RecomputeType();
6791 if (idx == kArrayPos)
return kNoRepresentation;
6820 return ReturnRepresentation(class_id());
6831#define FIELD_LIST(F) \
6832 F(const bool, index_unboxed_) \
6833 F(const intptr_t, index_scale_) \
6834 F(const intptr_t, class_id_) \
6835 F(const AlignmentType, alignment_) \
6836 F(const TokenPosition, token_pos_) \
6838 F(CompileType*, result_type_)
6860 intptr_t element_count,
6864 class_id_(class_id),
6866 element_count_(element_count),
6867 representation_(kTagged) {
6868 ASSERT(element_count == 1 || element_count == 2 || element_count == 4);
6882 return kNoRepresentation;
6903 return element_count() <=
6919#define FIELD_LIST(F) \
6920 F(const intptr_t, class_id_) \
6921 F(const TokenPosition, token_pos_) \
6922 F(const intptr_t, element_count_) \
6923 F(Representation, representation_)
6972 return other.AsStringToCharCode()->cid_ == cid_;
6975#define FIELD_LIST(F) F(const intptr_t, cid_)
7016 const Slot& decoder_scan_flags_field)
7017 : scan_flags_field_(decoder_scan_flags_field) {
7028 ASSERT(idx >= 0 || idx <= 4);
7046 return scan_flags_field_.Equals(other.AsUtf8Scan()->scan_flags_field_);
7049 bool IsScanFlagsUnboxed()
const;
7053#define FIELD_LIST(F) F(const Slot&, scan_flags_field_)
7071 intptr_t index_scale,
7079 enum { kArrayPos = 0, kIndexPos = 1, kValuePos = 2 };
7090 if (
value()->definition()->
Type()->IsBool()) {
7093 return value()->NeedsWriteBarrier() &&
7098 emit_store_barrier_ =
value;
7102 return speculative_mode_;
7132#define FIELD_LIST(F) \
7133 F(StoreBarrierType, emit_store_barrier_) \
7134 F(const bool, index_unboxed_) \
7135 F(const intptr_t, index_scale_) \
7136 F(const intptr_t, class_id_) \
7137 F(const AlignmentType, alignment_) \
7138 F(const TokenPosition, token_pos_) \
7139 F(const SpeculativeMode, speculative_mode_)
7157 intptr_t coverage_index,
7160 coverage_array_(coverage_array),
7161 coverage_index_(coverage_index),
7172#define FIELD_LIST(F) \
7173 F(const Array&, coverage_array_) \
7174 F(const intptr_t, coverage_index_) \
7175 F(const TokenPosition, token_pos_)
7236 ASSERT(
value->definition()->representation() == kUnboxedInt32);
7246 return kUnboxedInt32;
7264 Value* instantiator_type_arguments,
7265 Value* function_type_arguments,
7296#define FIELD_LIST(F) \
7297 F(const TokenPosition, token_pos_) \
7298 F(const AbstractType&, type_)
7353 auto*
const input_slot = SlotForInput(
i);
7354 if (input_slot !=
nullptr && input_slot->IsIdentical(slot)) {
7369#define FIELD_LIST(F) \
7370 F(const TokenPosition, token_pos_) \
7371 F(AliasIdentity, identity_)
7382template <
intptr_t N>
7412 enum { kTypeArgumentsPos = 0 };
7416 Value* type_arguments =
nullptr)
7419 has_type_arguments_(type_arguments != nullptr),
7420 type_arguments_slot_(nullptr),
7421 type_arguments_(type_arguments) {
7425 if (has_type_arguments_) {
7426 SetInputAt(kTypeArgumentsPos, type_arguments);
7427 type_arguments_slot_ =
7438 virtual intptr_t
InputCount()
const {
return has_type_arguments_ ? 1 : 0; }
7440 ASSERT(has_type_arguments_ &&
i == kTypeArgumentsPos);
7441 return type_arguments_;
7452 return WillAllocateNewOrRemembered(cls());
7460 return pos == kTypeArgumentsPos ? type_arguments_slot_ :
nullptr;
7465#define FIELD_LIST(F) \
7466 F(const Class&, cls_) \
7467 F(const bool, has_type_arguments_) \
7468 F(const Slot*, type_arguments_slot_)
7477 ASSERT(has_type_arguments_ && (
i == kTypeArgumentsPos));
7478 type_arguments_ =
value;
7493 kInstantiatorTypeArgsPos = 2,
7496 Value* closure_function,
7498 Value* instantiator_type_args,
7503 has_instantiator_type_args_(instantiator_type_args != nullptr),
7504 is_generic_(is_generic),
7505 is_tear_off_(is_tear_off) {
7508 if (has_instantiator_type_args_) {
7509 SetInputAt(kInstantiatorTypeArgsPos, instantiator_type_args);
7517 return has_instantiator_type_args() ? 3 : 2;
7524 return has_instantiator_type_args_;
7531 if (
value->BindsToConstant()) {
7533 return Function::Cast(
value->BoundConstant());
7535 return Object::null_function();
7541 return &Slot::Closure_function();
7543 return &Slot::Closure_context();
7544 case kInstantiatorTypeArgsPos:
7545 return has_instantiator_type_args()
7546 ? &Slot::Closure_instantiator_type_arguments()
7560 const auto other_ac = other.AsAllocateClosure();
7561 return (other_ac->has_instantiator_type_args() ==
7562 has_instantiator_type_args()) &&
7563 (other_ac->is_generic() == is_generic()) &&
7564 (other_ac->is_tear_off() == is_tear_off());
7571#define FIELD_LIST(F) \
7572 F(const bool, has_instantiator_type_args_) \
7573 F(const bool, is_generic_) \
7574 F(const bool, is_tear_off_)
7588 intptr_t num_context_variables,
7600 num_context_variables_);
7607#define FIELD_LIST(F) F(const intptr_t, num_context_variables_)
7639#define FIELD_LIST(F) F(const RecordShape, shape_)
7661 const intptr_t num_fields = shape.
num_fields();
7662 ASSERT(num_fields == 2 || num_fields == 3);
7663 ASSERT((num_fields > 2) == (value2 !=
nullptr));
7666 if (num_fields > 2) {
7691#define FIELD_LIST(F) F(const RecordShape, shape_)
7709 intptr_t length_or_shape,
7714 length_or_shape_(length_or_shape),
7716 registers_remapped_(
false),
7717 allocation_(allocation) {
7727 return slots_[
i]->offset_in_bytes();
7732 return locations_[
i];
7744 return kNoRepresentation;
7756 void RemapRegisters(intptr_t* cpu_reg_slots, intptr_t* fpu_reg_slots);
7763#define FIELD_LIST(F) \
7764 F(const Class&, cls_) \
7765 F(intptr_t, length_or_shape_) \
7766 F(const ZoneGrowableArray<const Slot*>&, slots_) \
7767 F(bool, registers_remapped_)
7780 bool visited_for_liveness_ =
false;
7794 return num_elements()->BindsToSmiConstant();
7797 return num_elements()->BoundSmiConstant();
7808template <
intptr_t N>
7832 Value* type_arguments,
7833 Value* num_elements,
7836 SetInputAt(kTypeArgumentsPos, type_arguments);
7840 enum { kTypeArgumentsPos = 0, kLengthPos = 1 };
7852 if (!HasConstantNumElements())
return false;
7854 GetConstantNumElements());
7859 case kTypeArgumentsPos:
7860 return &Slot::Array_type_arguments();
7862 return &Slot::Array_length();
7878 Value* num_elements,
7884 enum { kLengthPos = 0 };
7908#define FIELD_LIST(F) F(const classid_t, class_id_)
7942 return kNoRepresentation;
7957 return other.AsLoadUntagged()->offset_ == offset_;
7962#define FIELD_LIST(F) F(const intptr_t, offset_)
7987 intptr_t index_scale,
7989 : index_scale_(index_scale) {
7990 ASSERT(
base->definition()->representation() == kUntagged);
7992 ASSERT(1 <= index_scale && index_scale <= 16);
8003 if (idx == kBasePos)
return kUntagged;
8004 ASSERT(idx == kIndexPos || idx == kOffsetPos);
8020 return base()->definition()->MayCreateUnsafeUntaggedPointer();
8023 virtual bool AllowsCSE()
const {
return !MayCreateUnsafeUntaggedPointer(); }
8029 return other.AsCalculateElementAddress()->index_scale_ == index_scale_;
8034#define FIELD_LIST(F) F(const intptr_t, index_scale_)
8042 bool IsNoop()
const {
8044 offset()->BindsToSmiConstant() &&
offset()->BoundSmiConstant() == 0;
8054 bool input_can_be_smi =
true)
8055 : representation_(
representation), input_can_be_smi_(input_can_be_smi) {
8071 auto const other_load = other.AsLoadClassId();
8072 return other_load->representation_ == representation_ &&
8073 other_load->input_can_be_smi_ == input_can_be_smi_;
8081#define FIELD_LIST(F) \
8082 F(const Representation, representation_) \
8083 F(const bool, input_can_be_smi_)
8107 bool calls_initializer =
false,
8112 slot.IsDartField() ? &slot.field() : nullptr),
8114 loads_inner_pointer_(loads_inner_pointer) {
8115 switch (loads_inner_pointer) {
8134 bool calls_initializer =
false,
8147 return loads_inner_pointer_;
8154 loads_inner_pointer_ =
value;
8159 return slot_.has_untagged_instance() ? kUntagged : kTagged;
8173 bool MayCreateUntaggedAlias() const;
8175 virtual
bool MayCreateUnsafeUntaggedPointer() const;
8177 bool IsImmutableLoad()
const {
8181 if (slot().IsIdentical(Slot::PointerBase_data())) {
8184 return slot().is_immutable();
8206 static bool IsFixedLengthArrayCid(intptr_t
cid);
8210 virtual bool AllowsCSE()
const {
return slot_.is_immutable(); }
8218#define FIELD_LIST(F) \
8219 F(const Slot&, slot_) \
8220 F(InnerPointerAccess, loads_inner_pointer_)
8228 intptr_t OffsetInBytes()
const {
return slot().offset_in_bytes(); }
8232 void EmitNativeCodeForInitializerCall(FlowGraphCompiler*
compiler);
8241 Value* instantiator_type_arguments,
8242 Value* function_type_arguments,
8271#define FIELD_LIST(F) \
8272 F(const TokenPosition, token_pos_) \
8273 F(const AbstractType&, type_)
8287 Value* instantiator_type_arguments,
8288 Value* function_type_arguments,
8289 Value* type_arguments,
8290 const Class& instantiator_class,
8295 instantiator_class_(instantiator_class),
8297 DEBUG_ASSERT(instantiator_class.IsNotTemporaryScopedHandle());
8326 bool* with_runtime_check =
nullptr)
const {
8327 if (instantiator_class().
IsNull() || !type_arguments()->BindsToConstant() ||
8328 !type_arguments()->BoundConstant().IsTypeArguments()) {
8331 const auto& type_args =
8332 TypeArguments::Cast(type_arguments()->BoundConstant());
8333 return type_args.CanShareInstantiatorTypeArguments(instantiator_class(),
8334 with_runtime_check);
8338 if (
function().
IsNull() || !type_arguments()->BindsToConstant() ||
8339 !type_arguments()->BoundConstant().IsTypeArguments()) {
8342 const auto& type_args =
8343 TypeArguments::Cast(type_arguments()->BoundConstant());
8344 return type_args.CanShareFunctionTypeArguments(
function(),
8345 with_runtime_check);
8349 bool with_runtime_check;
8350 if (CanShareInstantiatorTypeArguments(&with_runtime_check)) {
8351 ASSERT(with_runtime_check);
8352 return StubCode::InstantiateTypeArgumentsMayShareInstantiatorTA();
8353 }
else if (CanShareFunctionTypeArguments(&with_runtime_check)) {
8354 ASSERT(with_runtime_check);
8355 return StubCode::InstantiateTypeArgumentsMayShareFunctionTA();
8357 return StubCode::InstantiateTypeArguments();
8362#define FIELD_LIST(F) \
8363 F(const TokenPosition, token_pos_) \
8364 F(const Class&, instantiator_class_) \
8365 F(const Function&, function_)
8389 return context_slots_;
8402 context_slots().
length());
8407#define FIELD_LIST(F) F(const ZoneGrowableArray<const Slot*>&, context_slots_)
8423 Value* context_value,
8428 context_slots_(context_slots) {
8436 return context_slots_;
8455#define FIELD_LIST(F) \
8456 F(const TokenPosition, token_pos_) \
8457 F(const ZoneGrowableArray<const Slot*>&, context_slots_)
8539 return from_representation();
8543 return other.AsBox()->from_representation() == from_representation();
8554#define FIELD_LIST(F) F(const Representation, from_representation_)
8563 : from_representation_(from_representation) {
8568 intptr_t ValueOffset()
const {
8580 virtual bool ValueFitsSmi()
const;
8585 virtual bool RecomputeType();
8685 const intptr_t value_cid =
value()->Type()->ToCid();
8686 const intptr_t box_cid = BoxCid();
8688 if (value_cid == box_cid) {
8692 if (CanConvertSmi() && (value_cid == kSmiCid)) {
8700 return speculative_mode_;
8708 auto const other_unbox = other.AsUnbox();
8710 (speculative_mode_ == other_unbox->speculative_mode_);
8719#define FIELD_LIST(F) \
8720 F(const Representation, representation_) \
8721 F(SpeculativeMode, speculative_mode_)
8735 speculative_mode_(speculative_mode) {
8742 speculative_mode_ =
value;
8746 bool CanConvertSmi()
const;
8753 intptr_t BoxCid()
const {
return Boxing::BoxCid(representation_); }
8770 is_truncating_(truncation_mode == kTruncate) {}
8779 auto const other_unbox = other.AsUnboxInteger();
8781 (other_unbox->is_truncating_ == is_truncating_);
8792#define FIELD_LIST(F) F(bool, is_truncating_)
8814 speculative_mode) {}
8855 speculative_mode) {}
8874 speculative_mode) {}
8885 return (
Type()->ToCid() == kMintCid) || IsBinaryInt64Op() ||
8886 IsUnaryInt64Op() || IsShiftInt64Op() || IsSpeculativeShiftInt64Op() ||
8887 IsBoxInt64() || IsUnboxInt64();
8902 bool handle_surrogates,
8904 : handle_surrogates_(handle_surrogates), cid_(
cid) {
8906 ASSERT(index_scale() == 2);
8933 const auto* other_compare = other.AsCaseInsensitiveCompare();
8934 return (other_compare->handle_surrogates_ == handle_surrogates_) &&
8935 (other_compare->cid_ == cid_);
8938#define FIELD_LIST(F) \
8939 F(const bool, handle_surrogates_) \
8940 F(const intptr_t, cid_)
8958 intptr_t result_cid)
8961 result_cid_(result_cid) {
8962 ASSERT((result_cid == kSmiCid) || (result_cid == kDoubleCid));
8977 if (result_cid() == kSmiCid) {
8980 ASSERT(result_cid() == kDoubleCid);
8981 return kUnboxedDouble;
8985 if (result_cid() == kSmiCid) {
8988 ASSERT(result_cid() == kDoubleCid);
8989 return kUnboxedDouble;
9002#define FIELD_LIST(F) \
9003 F(const MethodRecognizer::Kind, op_kind_) \
9004 F(const intptr_t, result_cid_)
9027 speculative_mode_(speculative_mode),
9047 ASSERT((idx == 0) || (idx == 1));
9048 return representation_;
9052 return speculative_mode_;
9070 auto const other_bin_op = other.AsBinaryDoubleOp();
9071 return (op_kind() == other_bin_op->op_kind()) &&
9072 (speculative_mode_ == other_bin_op->speculative_mode_) &&
9073 (representation_ == other_bin_op->representation_);
9076#define FIELD_LIST(F) \
9077 F(const Token::Kind, op_kind_) \
9078 F(const TokenPosition, token_pos_) \
9079 F(const SpeculativeMode, speculative_mode_) \
9080 F(const Representation, representation_)
9109 return kUnboxedDouble;
9121 return op_kind_ == other.AsDoubleTestOp()->op_kind() &&
9127#define FIELD_LIST(F) F(const MethodRecognizer::Kind, op_kind_)
9161 return kUnboxedDouble;
9212#define FIELD_LIST(F) F(const bool, smi_)
9229 ASSERT((op_kind == Token::kNEGATE) || (op_kind == Token::kBIT_NOT));
9246 return other.AsUnaryIntegerOp()->op_kind() == op_kind();
9261#define FIELD_LIST(F) F(const Token::Kind, op_kind_)
9279 return op_kind() == Token::kNEGATE;
9305 return kUnboxedUint32;
9309 return op_kind == Token::kBIT_NOT;
9327 speculative_mode_(speculative_mode) {
9328 ASSERT(op_kind == Token::kBIT_NOT || op_kind == Token::kNEGATE);
9337 return kUnboxedInt64;
9341 auto const unary_op_other = other.AsUnaryInt64Op();
9343 (speculative_mode_ == unary_op_other->speculative_mode_);
9347 return speculative_mode_;
9352#define FIELD_LIST(F) F(const SpeculativeMode, speculative_mode_)
9371 can_overflow_(
true),
9372 is_truncating_(
false) {
9402 ASSERT(!is_truncating_ || !overflow);
9403 can_overflow_ = overflow;
9408 is_truncating_ =
true;
9409 set_can_overflow(
false);
9414 bool RightIsNonZero()
const;
9418 bool RightIsPowerOfTwoConstant()
const;
9434#define FIELD_LIST(F) \
9435 F(const Token::Kind, op_kind_) \
9436 F(bool, can_overflow_) \
9437 F(bool, is_truncating_)
9445 void InferRangeHelper(
const Range* left_range,
9446 const Range* right_range,
9462 Range* right_range =
nullptr)
9464 right_range_(right_range) {}
9473 Range* right_range()
const {
return right_range_; }
9475#define FIELD_LIST(F) F(Range*, right_range_)
9498#if defined(TARGET_ARCH_IS_32_BIT)
9503 case Token::kBIT_AND:
9504 case Token::kBIT_OR:
9505 case Token::kBIT_XOR:
9511 if (right->BindsToConstant() && right->BoundConstant().IsSmi()) {
9512 const intptr_t
value = Smi::Cast(right->BoundConstant()).Value();
9530 ASSERT((idx == 0) || (idx == 1));
9531 return kUnboxedInt32;
9558 ASSERT((idx == 0) || (idx == 1));
9559 return kUnboxedUint32;
9571 case Token::kBIT_AND:
9572 case Token::kBIT_OR:
9573 case Token::kBIT_XOR:
9596 speculative_mode_(speculative_mode) {
9606 return (op_kind() == Token::kMOD || op_kind() == Token::kTRUNCDIV) &&
9613 ASSERT((idx == 0) || (idx == 1));
9614 return kUnboxedInt64;
9618 return speculative_mode_;
9623 (speculative_mode_ == other.AsBinaryInt64Op()->speculative_mode_);
9628#define FIELD_LIST(F) F(const SpeculativeMode, speculative_mode_)
9647 Range* right_range =
nullptr)
9649 shift_range_(right_range) {
9650 ASSERT((op_kind == Token::kSHL) || (op_kind == Token::kSHR) ||
9651 (op_kind == Token::kUSHR));
9664#define FIELD_LIST(F) F(Range*, shift_range_)
9672 static constexpr intptr_t kShiftCountLimit = 63;
9676 bool IsShiftCountInRange(int64_t
max = kShiftCountLimit)
const;
9690 Range* right_range =
nullptr)
9697 virtual bool MayThrow()
const {
return !IsShiftCountInRange(); }
9702 ASSERT((idx == 0) || (idx == 1));
9703 return kUnboxedInt64;
9722 Range* right_range =
nullptr)
9727 return !IsShiftCountInRange();
9733 ASSERT((idx == 0) || (idx == 1));
9734 return (idx == 0) ? kUnboxedInt64 : kTagged;
9753 Range* right_range =
nullptr)
9761 return !IsShiftCountInRange(kUint32ShiftCountLimit);
9767 ASSERT((idx == 0) || (idx == 1));
9768 return (idx == 0) ? kUnboxedUint32 : kUnboxedInt64;
9776 static constexpr intptr_t kUint32ShiftCountLimit = 31;
9789 Range* right_range =
nullptr)
9797 ASSERT((idx == 0) || (idx == 1));
9798 return (idx == 0) ? kUnboxedUint32 : kTagged;
9807 static constexpr intptr_t kUint32ShiftCountLimit = 31;
9821 speculative_mode_(speculative_mode),
9845 return representation_;
9849 return speculative_mode_;
9854 return (op_kind_ == other_op->op_kind_) &&
9855 (speculative_mode_ == other_op->speculative_mode_) &&
9856 (representation_ == other_op->representation_);
9863#define FIELD_LIST(F) \
9864 F(const Token::Kind, op_kind_) \
9865 F(const SpeculativeMode, speculative_mode_) \
9866 F(const Representation, representation_)
9892 intptr_t loop_depth,
9898 loop_depth_(loop_depth),
9900 ASSERT(kind != kOsrOnly || loop_depth > 0);
9929#define FIELD_LIST(F) \
9930 F(const TokenPosition, token_pos_) \
9931 F(const intptr_t, stack_depth_) \
9932 F(const intptr_t, loop_depth_) \
9933 F(const Kind, kind_)
9963#define FIELD_LIST(F) F(const TokenPosition, token_pos_)
9984 return kUnboxedInt32;
10014 return kUnboxedInt64;
10028 return speculative_mode_;
10032 return speculative_mode_ == other.AsInt64ToDouble()->speculative_mode_;
10035#define FIELD_LIST(F) F(const SpeculativeMode, speculative_mode_)
10052 ASSERT((recognized_kind == MethodRecognizer::kDoubleToInteger) ||
10053 (recognized_kind == MethodRecognizer::kDoubleFloorToInt) ||
10054 (recognized_kind == MethodRecognizer::kDoubleCeilToInt));
10067 return kUnboxedDouble;
10084 return other.AsDoubleToInteger()->recognized_kind() == recognized_kind();
10089#define FIELD_LIST(F) F(MethodRecognizer::Kind, recognized_kind_)
10097 static bool SupportsFloorAndCeil();
10120 return kUnboxedDouble;
10152 return kUnboxedDouble;
10156 return speculative_mode_;
10165#define FIELD_LIST(F) F(const SpeculativeMode, speculative_mode_)
10193 return kUnboxedFloat;
10212 : op_kind_(op_kind) {
10231 return kUnboxedFloat;
10235 return other.AsFloatCompare()->op_kind() == op_kind();
10238#define FIELD_LIST(F) F(const Token::Kind, op_kind_)
10273 return kUnboxedDouble;
10287 auto const other_invoke = other.AsInvokeMathCFunction();
10288 return other_invoke->recognized_kind() == recognized_kind();
10295 static constexpr intptr_t kSavedSpTempIndex = 0;
10296 static constexpr intptr_t kObjectTempIndex = 1;
10297 static constexpr intptr_t kDoubleTempIndex = 2;
10301#define FIELD_LIST(F) \
10302 F(const MethodRecognizer::Kind, recognized_kind_) \
10303 F(const TokenPosition, token_pos_)
10320 intptr_t definition_cid)
10322 definition_rep_(definition_rep),
10323 definition_cid_(definition_cid) {
10342 return kPairOfTagged;
10345 return definition_rep_;
10349 auto const other_extract = other.AsExtractNthOutput();
10351 (other_extract->index() == index());
10356#define FIELD_LIST(F) \
10357 F(const intptr_t, index_) \
10358 F(const Representation, definition_rep_) \
10359 F(const intptr_t, definition_cid_)
10402 intptr_t definition_cid)
10404 definition_rep_(definition_rep),
10405 definition_cid_(definition_cid) {
10416 intptr_t
lane()
const {
return lane_; }
10426 auto const other_split = other.AsUnboxLane();
10428 (other_split->lane() == lane());
10435#define FIELD_LIST(F) \
10436 F(const intptr_t, lane_) \
10437 F(const Representation, definition_rep_) \
10438 F(const intptr_t, definition_cid_)
10452 : from_representation_(from_representation) {
10453 ASSERT(from_representation == kUnboxedDouble);
10454 ASSERT(
x->definition()->representation() == from_representation);
10455 ASSERT(
y->definition()->representation() == from_representation);
10464 : from_representation_(from_representation) {
10465 ASSERT((from_representation == kUnboxedInt32) ||
10466 (from_representation == kUnboxedFloat));
10467 ASSERT(
x->definition()->representation() == from_representation);
10468 ASSERT(
y->definition()->representation() == from_representation);
10470 ASSERT(
w->definition()->representation() == from_representation);
10478 switch (from_representation_) {
10479 case kUnboxedDouble:
10481 case kUnboxedFloat:
10483 case kUnboxedInt32:
10493 ASSERT((from_representation() == kUnboxedInt32) ||
10494 (from_representation() == kUnboxedFloat));
10498 ASSERT((from_representation() == kUnboxedInt32) ||
10499 (from_representation() == kUnboxedFloat));
10511 ASSERT(idx == 0 || idx == 1 || idx == 2 || idx == 3);
10512 return from_representation();
10516 return other.AsBoxLanes()->from_representation() == from_representation();
10529#define FIELD_LIST(F) F(const Representation, from_representation_)
10544 static intptr_t OutputIndexOf(
Token::Kind token);
10566 Range* divisor_range()
const {
10600 bool IsNullCheck()
const {
return IsDeoptIfNull() || IsDeoptIfNotNull(); }
10602 bool IsDeoptIfNull()
const;
10603 bool IsDeoptIfNotNull()
const;
10605 bool IsBitTest()
const;
10606 static bool IsCompactCidRange(
const Cids& cids);
10607 intptr_t ComputeCidMask()
const;
10616#define FIELD_LIST(F) \
10617 F(const Cids&, cids_) \
10618 F(bool, is_bit_test_) \
10619 F(const TokenPosition, token_pos_)
10629 intptr_t cid_start,
10634 bool use_near_jump);
10665#define FIELD_LIST(F) F(const TokenPosition, token_pos_)
10695 exception_type_(exception_type) {
10713 virtual bool RecomputeType();
10727 static void AddMetadataForRuntimeCall(
CheckNullInstr* check_null,
10730 virtual Value* RedefinedValue()
const;
10734#define FIELD_LIST(F) \
10735 F(const TokenPosition, token_pos_) \
10736 F(const String&, function_name_) \
10737 F(const ExceptionType, exception_type_)
10773#define FIELD_LIST(F) F(CidRangeValue, cids_)
10803 virtual Value* RedefinedValue()
const;
10807 bool IsRedundant(
bool use_loops =
false);
10810 enum { kLengthPos = 0, kIndexPos = 1 };
10831 virtual bool RecomputeType();
10838 static intptr_t LengthOffsetFor(intptr_t class_id);
10840 static bool IsFixedLengthArrayType(intptr_t class_id);
10844#define FIELD_LIST(F) F(bool, generalized_)
10876 virtual bool RecomputeType();
10885 return UseUnboxedRepresentation() ? kUnboxedInt64 : kTagged;
10889 ASSERT(idx == kIndexPos || idx == kLengthPos);
10890 return UseUnboxedRepresentation() ? kUnboxedInt64 : kTagged;
10915 kWriteUnmodifiableTypedData = 0,
10916 kDeeplyImmutableAttachNativeFinalizer = 1,
10922 Kind kind = Kind::kWriteUnmodifiableTypedData)
10935 virtual Value* RedefinedValue()
const;
10949#define FIELD_LIST(F) F(const Kind, kind_)
10969 for (intptr_t
i = comparison->
InputCount() - 1;
i >= 0; --
i) {
10990 virtual intptr_t
InputCount()
const {
return comparison()->InputCount(); }
10997 comparison()->CopyDeoptIdFrom(instr);
11002#define FIELD_LIST(F) F(ComparisonInstr*, comparison_)
11012 comparison()->RawSetInputAt(
i,
value);
11025 from_representation_(from),
11026 to_representation_(to),
11027 is_truncating_(to == kUnboxedUint32) {
11032 ASSERT(from == kUnboxedInt64 || from == kUnboxedUint32 ||
11033 from == kUnboxedInt32 || from == kUntagged);
11034 ASSERT(to == kUnboxedInt64 || to == kUnboxedUint32 || to == kUnboxedInt32 ||
11040 ASSERT(!
value->definition()->MayCreateUnsafeUntaggedPointer());
11064 ASSERT(other.IsIntConverter());
11065 auto const converter = other.AsIntConverter();
11067 (
converter->is_truncating() == is_truncating());
11083 (from(), to(), is_truncating()))
11087#define FIELD_LIST(F) \
11088 F(const Representation, from_representation_) \
11089 F(const Representation, to_representation_) \
11090 F(bool, is_truncating_)
11108 from_representation_(from),
11109 to_representation_(to) {
11111 ASSERT((to == kUnboxedInt32 && from == kUnboxedFloat) ||
11112 (to == kUnboxedFloat && from == kUnboxedInt32) ||
11113 (to == kUnboxedInt64 && from == kUnboxedDouble) ||
11114 (to == kUnboxedDouble && from == kUnboxedInt64));
11133 ASSERT(other.IsBitCast());
11134 auto const converter = other.AsBitCast();
11142#define FIELD_LIST(F) \
11143 F(const Representation, from_representation_) \
11144 F(const Representation, to_representation_)
11174 ASSERT(other.IsLoadThread());
11210#define SIMD_BINARY_OP(M, T, Name) M(2, _, T##Name, (T, T), T)
11214#define SIMD_BINARY_FLOAT_OP_LIST(M, OP, T) \
11215 SIMD_BINARY_OP(OP, T, Add) \
11216 SIMD_BINARY_OP(OP, T, Sub) \
11217 SIMD_BINARY_OP(OP, T, Mul) \
11218 SIMD_BINARY_OP(OP, T, Div) \
11219 SIMD_BINARY_OP(M, T, Min) \
11220 SIMD_BINARY_OP(M, T, Max)
11224#define SIMD_BINARY_INTEGER_OP_LIST(M, OP, T) \
11225 SIMD_BINARY_OP(OP, T, Add) \
11226 SIMD_BINARY_OP(OP, T, Sub) \
11227 SIMD_BINARY_OP(OP, T, BitAnd) \
11228 SIMD_BINARY_OP(OP, T, BitOr) \
11229 SIMD_BINARY_OP(OP, T, BitXor)
11232#define SIMD_PER_COMPONENT_XYZW(M, Arity, Name, Inputs, Output) \
11233 M(Arity, _, Name##X, Inputs, Output) \
11234 M(Arity, _, Name##Y, Inputs, Output) \
11235 M(Arity, _, Name##Z, Inputs, Output) \
11236 M(Arity, _, Name##W, Inputs, Output)
11239#define SIMD_CONVERSION(M, FromType, ToType) \
11240 M(1, _, FromType##To##ToType, (FromType), ToType)
11249#define SIMD_OP_LIST(M, BINARY_OP) \
11250 SIMD_BINARY_FLOAT_OP_LIST(M, BINARY_OP, Float32x4) \
11251 SIMD_BINARY_FLOAT_OP_LIST(M, BINARY_OP, Float64x2) \
11252 SIMD_BINARY_INTEGER_OP_LIST(M, BINARY_OP, Int32x4) \
11253 SIMD_PER_COMPONENT_XYZW(M, 1, Float32x4Get, (Float32x4), Double) \
11254 SIMD_PER_COMPONENT_XYZW(M, 2, Float32x4With, (Double, Float32x4), Float32x4) \
11255 SIMD_PER_COMPONENT_XYZW(M, 1, Int32x4GetFlag, (Int32x4), Bool) \
11256 SIMD_PER_COMPONENT_XYZW(M, 2, Int32x4WithFlag, (Int32x4, Bool), Int32x4) \
11257 M(1, MASK, Float32x4Shuffle, (Float32x4), Float32x4) \
11258 M(1, MASK, Int32x4Shuffle, (Int32x4), Int32x4) \
11259 M(2, MASK, Float32x4ShuffleMix, (Float32x4, Float32x4), Float32x4) \
11260 M(2, MASK, Int32x4ShuffleMix, (Int32x4, Int32x4), Int32x4) \
11261 M(2, _, Float32x4Equal, (Float32x4, Float32x4), Int32x4) \
11262 M(2, _, Float32x4GreaterThan, (Float32x4, Float32x4), Int32x4) \
11263 M(2, _, Float32x4GreaterThanOrEqual, (Float32x4, Float32x4), Int32x4) \
11264 M(2, _, Float32x4LessThan, (Float32x4, Float32x4), Int32x4) \
11265 M(2, _, Float32x4LessThanOrEqual, (Float32x4, Float32x4), Int32x4) \
11266 M(2, _, Float32x4NotEqual, (Float32x4, Float32x4), Int32x4) \
11267 M(4, _, Int32x4FromInts, (Int32, Int32, Int32, Int32), Int32x4) \
11268 M(4, _, Int32x4FromBools, (Bool, Bool, Bool, Bool), Int32x4) \
11269 M(4, _, Float32x4FromDoubles, (Double, Double, Double, Double), Float32x4) \
11270 M(2, _, Float64x2FromDoubles, (Double, Double), Float64x2) \
11271 M(0, _, Float32x4Zero, (), Float32x4) \
11272 M(0, _, Float64x2Zero, (), Float64x2) \
11273 M(1, _, Float32x4Splat, (Double), Float32x4) \
11274 M(1, _, Float64x2Splat, (Double), Float64x2) \
11275 M(1, _, Int32x4GetSignMask, (Int32x4), Int8) \
11276 M(1, _, Float32x4GetSignMask, (Float32x4), Int8) \
11277 M(1, _, Float64x2GetSignMask, (Float64x2), Int8) \
11278 M(2, _, Float32x4Scale, (Double, Float32x4), Float32x4) \
11279 M(2, _, Float64x2Scale, (Float64x2, Double), Float64x2) \
11280 M(1, _, Float32x4Sqrt, (Float32x4), Float32x4) \
11281 M(1, _, Float64x2Sqrt, (Float64x2), Float64x2) \
11282 M(1, _, Float32x4Reciprocal, (Float32x4), Float32x4) \
11283 M(1, _, Float32x4ReciprocalSqrt, (Float32x4), Float32x4) \
11284 M(1, _, Float32x4Negate, (Float32x4), Float32x4) \
11285 M(1, _, Float64x2Negate, (Float64x2), Float64x2) \
11286 M(1, _, Float32x4Abs, (Float32x4), Float32x4) \
11287 M(1, _, Float64x2Abs, (Float64x2), Float64x2) \
11288 M(3, _, Float32x4Clamp, (Float32x4, Float32x4, Float32x4), Float32x4) \
11289 M(3, _, Float64x2Clamp, (Float64x2, Float64x2, Float64x2), Float64x2) \
11290 M(1, _, Float64x2GetX, (Float64x2), Double) \
11291 M(1, _, Float64x2GetY, (Float64x2), Double) \
11292 M(2, _, Float64x2WithX, (Float64x2, Double), Float64x2) \
11293 M(2, _, Float64x2WithY, (Float64x2, Double), Float64x2) \
11294 M(3, _, Int32x4Select, (Int32x4, Float32x4, Float32x4), Float32x4) \
11295 SIMD_CONVERSION(M, Float32x4, Int32x4) \
11296 SIMD_CONVERSION(M, Int32x4, Float32x4) \
11297 SIMD_CONVERSION(M, Float32x4, Float64x2) \
11298 SIMD_CONVERSION(M, Float64x2, Float32x4)
11303#define DECLARE_ENUM(Arity, Mask, Name, ...) k##Name,
11314 intptr_t mask = 0);
11382 auto const other_op = other.AsSimdOp();
11383 return kind() == other_op->kind() &&
11384 (!HasMask() || mask() == other_op->mask());
11392#define FIELD_LIST(F) \
11393 F(const Kind, kind_) \
11404 : Definition(
deopt_id), kind_(kind) {
11409 : Definition(
deopt_id), kind_(kind) {
11414 bool HasMask()
const;
11415 void set_mask(intptr_t mask) { mask_ = mask; }
11431 kCloneSuspendState,
11435 kFfiAsyncCallbackSend,
11463#define FIELD_LIST(F) \
11464 F(const StubId, stub_id_) \
11465 F(const TokenPosition, token_pos_)
11481 kAwaitWithTypeCheck,
11483 kSuspendSyncStarAtStart,
11484 kSuspendSyncStarAtYield,
11492 intptr_t resume_deopt_id)
11495 resume_deopt_id_(resume_deopt_id),
11498 if (has_type_args()) {
11501 ASSERT(type_args ==
nullptr);
11506 virtual intptr_t
InputCount()
const {
return has_type_args() ? 2 : 1; }
11510 ASSERT(has_type_args());
11531#define FIELD_LIST(F) \
11532 F(StubId, stub_id_) \
11533 F(const intptr_t, resume_deopt_id_) \
11534 F(const TokenPosition, token_pos_)
11537 TemplateDefinition,
11545#undef DECLARE_INSTRUCTION
11557 environment_(other.environment_),
11558 index_(other.index_) {}
11561 environment_ = other.environment_;
11562 index_ = other.index_;
11574 return (environment_ ==
nullptr) || (index_ >= environment_->Length());
11579 ASSERT(environment_->values_[index_] !=
nullptr);
11580 return environment_->values_[index_];
11586 environment_->values_[index_] =
value;
11591 return environment_->locations_[index_];
11596 environment_->locations_[index_] = loc;
11614 iterator_.Advance();
11618 bool Done()
const {
return iterator_.environment() ==
nullptr; }
11622 return iterator_.CurrentValue();
11627 iterator_.SetCurrentValue(
value);
11632 return iterator_.CurrentLocation();
11637 iterator_.SetCurrentLocation(loc);
11642 while (!Done() && iterator_.Done()) {
11647 ShallowIterator iterator_;
11651 static Environment* From(Zone* zone,
11652 const GrowableArray<Definition*>& definitions,
11653 intptr_t fixed_parameter_count,
11654 intptr_t lazy_deopt_pruning_count,
11655 const ParsedFunction& parsed_function);
11658 ASSERT(locations_ ==
nullptr);
11659 locations_ = locations;
11679 bitfield_ = LazyDeoptToBeforeDeoptId::update(
true, bitfield_);
11682 bitfield_ = LazyDeoptPruningBits::update(0, bitfield_);
11691 if (LazyDeoptToBeforeDeoptId()) {
11692 ASSERT(LazyDeoptPruneCount() == 0);
11694 const intptr_t num_args_to_prune = LazyDeoptPruneCount();
11695 if (num_args_to_prune == 0)
return this;
11696 return DeepCopy(zone, Length() - num_args_to_prune);
11703 while (
result->outer() !=
nullptr)
11712 intptr_t
Length()
const {
return values_.length(); }
11715 ASSERT((index >= 0) && (index < values_.length()));
11716 return locations_[index];
11722 while (index >=
env->Length()) {
11724 index -=
env->Length();
11727 return env->ValueAt(index);
11733 intptr_t
count = 0;
11735 if (it.CurrentValue()->definition()->IsMoveArgument()) {
11747 void DeepCopyToOuter(
Zone* zone,
11749 intptr_t outer_deopt_id)
const;
11751 void DeepCopyAfterTo(
Zone* zone,
11772 class LazyDeoptPruningBits :
public BitField<uintptr_t, uintptr_t, 0, 8> {};
11773 class LazyDeoptToBeforeDeoptId
11774 :
public BitField<uintptr_t, bool, LazyDeoptPruningBits::kNextBit, 1> {};
11775 class Hoisted :
public BitField<uintptr_t,
11777 LazyDeoptToBeforeDeoptId::kNextBit,
11779 class DeoptIdBits :
public BitField<uintptr_t,
11782 kBitsPerWord - Hoisted::kNextBit,
11785 Environment(intptr_t
length,
11786 intptr_t fixed_parameter_count,
11787 intptr_t lazy_deopt_pruning_count,
11789 Environment* outer)
11791 fixed_parameter_count_(fixed_parameter_count),
11794 LazyDeoptPruningBits::
encode(lazy_deopt_pruning_count)),
11798 void SetDeoptId(intptr_t
deopt_id) {
11799 bitfield_ = DeoptIdBits::update(
deopt_id, bitfield_);
11801 void SetLazyDeoptPruneCount(intptr_t
value) {
11802 bitfield_ = LazyDeoptPruningBits::update(
value, bitfield_);
11804 void SetLazyDeoptToBeforeDeoptId(
bool value) {
11805 bitfield_ = LazyDeoptToBeforeDeoptId::update(
value, bitfield_);
11808 GrowableArray<Value*> values_;
11810 const intptr_t fixed_parameter_count_;
11813 uintptr_t bitfield_;
11814 const Function& function_;
11815 Environment* outer_;
11827#define DECLARE_VISIT_INSTRUCTION(ShortName, Attrs) \
11828 virtual void Visit##ShortName(ShortName##Instr* instr) {}
11832#undef DECLARE_VISIT_INSTRUCTION
11843 : current_iterator_(nullptr), block_order_(&block_order) {}
11847 return current_iterator_;
11852 virtual void VisitBlocks();
11856 block_order_ = &block_order;
11867#define DEFINE_UNIMPLEMENTED_INSTRUCTION(Name) \
11868 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
11872 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { \
11876template <
intptr_t kExtraInputs>
11878 if (
auto static_call = this->AsStaticCall()) {
11879 return static_call->function().name();
11880 }
else if (
auto instance_call = this->AsInstanceCall()) {
11881 return instance_call->function_name().ptr();
11889 return (constant ==
nullptr) || constant->
value().
ptr() ==
value.ptr();
11891#undef DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS
11892#undef DECLARE_CUSTOM_SERIALIZATION
11893#undef DECLARE_EMPTY_SERIALIZATION
static void done(const char *config, const char *src, const char *srcOptions, const char *name)
static float next(float f)
static float prev(float f)
static sk_sp< Effect > Create()
static void encode(uint8_t output[16], const uint32_t input[4])
static void copy(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
#define DEBUG_ASSERT(cond)
#define ASSERT_EQUAL(expected, actual)
static AliasIdentity NotAliased()
static AliasIdentity Aliased()
bool IsNotAliased() const
AliasIdentity & operator=(const AliasIdentity &other)
bool IsAllocationSinkingCandidate() const
static AliasIdentity Unknown()
AliasIdentity(const AliasIdentity &other)
static AliasIdentity AllocationSinkingCandidate()
virtual const Slot * SlotForInput(intptr_t pos)
virtual bool WillAllocateNewOrRemembered() const
virtual bool AllowsCSE() const
virtual intptr_t InputCount() const
virtual bool AttributesEqual(const Instruction &other) const
bool has_instantiator_type_args() const
Value * closure_function() const
virtual bool HasUnknownSideEffects() const
const Function & known_function() const
AllocateClosureInstr(const InstructionSource &source, Value *closure_function, Value *context, Value *instantiator_type_args, bool is_generic, bool is_tear_off, intptr_t deopt_id)
virtual bool HasUnknownSideEffects() const
const ZoneGrowableArray< const Slot * > & context_slots() const
virtual bool ComputeCanDeoptimize() const
AllocateContextInstr(const InstructionSource &source, const ZoneGrowableArray< const Slot * > &context_slots, intptr_t deopt_id)
intptr_t num_context_variables() const
virtual bool WillAllocateNewOrRemembered() const
DISALLOW_COPY_AND_ASSIGN(AllocateObjectInstr)
Value * type_arguments() const
virtual bool MayHaveVisibleEffect() const
const Class & cls() const
virtual bool HasUnknownSideEffects() const
virtual Value * InputAt(intptr_t i) const
AllocateObjectInstr(const InstructionSource &source, const Class &cls, intptr_t deopt_id, Value *type_arguments=nullptr)
virtual const Slot * SlotForInput(intptr_t pos)
virtual bool WillAllocateNewOrRemembered() const
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(AllocateObjectInstr, AllocationInstr, FIELD_LIST) private
static bool WillAllocateNewOrRemembered(const Class &cls)
virtual intptr_t InputCount() const
virtual bool HasUnknownSideEffects() const
virtual bool WillAllocateNewOrRemembered() const
AllocateRecordInstr(const InstructionSource &source, RecordShape shape, intptr_t deopt_id)
RecordShape shape() const
intptr_t num_fields() const
virtual bool WillAllocateNewOrRemembered() const
intptr_t num_fields() const
AllocateSmallRecordInstr(const InstructionSource &source, RecordShape shape, Value *value0, Value *value1, Value *value2, intptr_t deopt_id)
virtual const Slot * SlotForInput(intptr_t pos)
virtual bool HasUnknownSideEffects() const
RecordShape shape() const
virtual intptr_t InputCount() const
virtual bool WillAllocateNewOrRemembered() const
AllocateTypedDataInstr(const InstructionSource &source, classid_t class_id, Value *num_elements, intptr_t deopt_id)
classid_t class_id() const
virtual Value * num_elements() const
virtual bool HasUnknownSideEffects() const
virtual const Slot * SlotForInput(intptr_t pos)
virtual bool WillAllocateNewOrRemembered() const
virtual bool HasUnknownSideEffects() const
intptr_t num_context_variables() const
virtual bool ObjectIsInitialized()
virtual bool MayThrow() const
intptr_t InputForSlot(const Slot &slot)
virtual bool WillAllocateNewOrRemembered() const =0
virtual AliasIdentity Identity() const
virtual bool ObjectIsInitialized()
virtual void SetIdentity(AliasIdentity identity)
virtual const Slot * SlotForInput(intptr_t pos)
AllocationInstr(const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
virtual TokenPosition token_pos() const
virtual bool ComputeCanDeoptimize() const
virtual bool ComputeCanDeoptimizeAfterCall() const
virtual intptr_t NumberOfInputsConsumedBeforeCall() const
PRINT_OPERANDS_TO_SUPPORT DECLARE_ABSTRACT_INSTRUCTION(Allocation)
static ArrayPtr New(intptr_t type_args_len, intptr_t num_arguments, intptr_t size_arguments, const Array &optional_arguments_names, Heap::Space space=Heap::kOld)
intptr_t GetConstantNumElements() const
ArrayAllocationInstr(const InstructionSource &source, intptr_t deopt_id)
bool HasConstantNumElements() const
virtual Value * num_elements() const =0
DECLARE_ABSTRACT_INSTRUCTION(ArrayAllocation)
virtual bool ComputeCanDeoptimize() const
const String & dst_name() const
virtual intptr_t NumberOfInputsConsumedBeforeCall() const
Value * function_type_arguments() const
Value * instantiator_type_arguments() const
virtual bool AttributesEqual(const Instruction &other) const
virtual bool CanBecomeDeoptimizationTarget() const
virtual bool ComputeCanDeoptimizeAfterCall() const
@ FOR_EACH_ASSERT_ASSIGNABLE_KIND
AssertAssignableInstr(const InstructionSource &source, Value *value, Value *dst_type, Value *instantiator_type_arguments, Value *function_type_arguments, const String &dst_name, intptr_t deopt_id, Kind kind=kUnknown)
virtual TokenPosition token_pos() const
virtual TokenPosition token_pos() const
virtual bool ComputeCanDeoptimizeAfterCall() const
virtual intptr_t NumberOfInputsConsumedBeforeCall() const
virtual bool AttributesEqual(const Instruction &other) const
AssertBooleanInstr(const InstructionSource &source, Value *value, intptr_t deopt_id)
virtual bool ComputeCanDeoptimize() const
virtual bool CanBecomeDeoptimizationTarget() const
AssertSubtypeInstr(const InstructionSource &source, Value *instantiator_type_arguments, Value *function_type_arguments, Value *sub_type, Value *super_type, Value *dst_name, intptr_t deopt_id)
virtual bool AttributesEqual(const Instruction &other) const
Value * function_type_arguments() const
DECLARE_INSTRUCTION(AssertSubtype)
virtual TokenPosition token_pos() const
Value * super_type() const
virtual bool ComputeCanDeoptimizeAfterCall() const
virtual bool ComputeCanDeoptimize() const
Value * instantiator_type_arguments() const
virtual intptr_t NumberOfInputsConsumedBeforeCall() const
Instruction * Current() const
BackwardInstructionIterator(BlockEntryInstr *block_entry)
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
BinaryDoubleOpInstr(Token::Kind op_kind, Value *left, Value *right, intptr_t deopt_id, const InstructionSource &source, SpeculativeMode speculative_mode=kGuardInputs, Representation representation=kUnboxedDouble)
Token::Kind op_kind() const
virtual TokenPosition token_pos() const
virtual Representation representation() const
virtual bool ComputeCanDeoptimize() const
virtual intptr_t DeoptimizationTarget() const
bool OperandsAre(intptr_t cid) const
bool OperandsAreSmiOrMint() const
bool IncludesOperands(intptr_t cid) const
bool OperandsAreSmiOrNull() const
bool ArgumentIs(intptr_t cid) const
static const BinaryFeedback * CreateMonomorphic(Zone *zone, intptr_t receiver_cid, intptr_t argument_cid)
bool OperandsAreSmiOrDouble() const
bool OperandsAreEither(intptr_t cid_a, intptr_t cid_b) const
BinaryFeedback(Zone *zone)
static const BinaryFeedback * Create(Zone *zone, const ICData &ic_data)
virtual Representation RequiredInputRepresentation(intptr_t idx) const
BinaryInt32OpInstr(Token::Kind op_kind, Value *left, Value *right, intptr_t deopt_id)
virtual Representation representation() const
static bool IsSupported(Token::Kind op_kind, Value *left, Value *right)
virtual bool ComputeCanDeoptimize() const
BinaryInt64OpInstr(Token::Kind op_kind, Value *left, Value *right, intptr_t deopt_id, SpeculativeMode speculative_mode=kGuardInputs)
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual bool AttributesEqual(const Instruction &other) const
virtual Representation representation() const
virtual bool MayThrow() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
void set_can_overflow(bool overflow)
bool can_overflow() const
Token::Kind op_kind() const
virtual bool AttributesEqual(const Instruction &other) const
bool is_truncating() const
BinaryIntegerOpInstr(Token::Kind op_kind, Value *left, Value *right, intptr_t deopt_id)
virtual intptr_t DeoptimizationTarget() const
BinarySmiOpInstr(Token::Kind op_kind, Value *left, Value *right, intptr_t deopt_id, Range *right_range=nullptr)
virtual bool ComputeCanDeoptimize() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
virtual Representation representation() const
BinaryUint32OpInstr(Token::Kind op_kind, Value *left, Value *right, intptr_t deopt_id)
virtual Representation RequiredInputRepresentation(intptr_t idx) const
static bool IsSupported(Token::Kind op_kind)
BitCastInstr(Representation from, Representation to, Value *value)
Representation to() const
virtual bool AttributesEqual(const Instruction &other) const
virtual bool ComputeCanDeoptimize() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
Representation from() const
DECLARE_INSTRUCTION(BitCast)
virtual Representation representation() const
ForwardInstructionIterator end() const
ForwardInstructionIterator begin() const
InstructionsIterable(BlockEntryInstr *block)
BlockEntryInstr * dominator() const
InstructionsIterable instructions()
void ClearDominatedBlocks()
intptr_t NestingDepth() const
void set_preorder_number(intptr_t number)
intptr_t try_index() const
intptr_t postorder_number() const
ParallelMoveInstr * GetParallelMove()
bool FindOsrEntryAndRelink(GraphEntryInstr *graph_entry, Instruction *parent, BitVector *block_marks)
void AddDominatedBlock(BlockEntryInstr *block)
virtual void ClearPredecessors()=0
ParallelMoveInstr * parallel_move() const
void set_block_id(intptr_t block_id)
virtual bool ComputeCanDeoptimize() const
bool HasNonRedundantParallelMove() const
intptr_t preorder_number() const
bool HasParallelMove() const
bool InsideTryBlock() const
intptr_t block_id() const
virtual bool HasUnknownSideEffects() const
virtual intptr_t PredecessorCount() const =0
void set_try_index(intptr_t index)
BlockEntryInstr * ImmediateDominator() const
LoopInfo * loop_info() const
virtual BlockEntryInstr * GetBlock()
void set_loop_info(LoopInfo *loop_info)
virtual void AddPredecessor(BlockEntryInstr *predecessor)=0
void set_end_pos(intptr_t pos)
void set_stack_depth(intptr_t s)
const GrowableArray< BlockEntryInstr * > & dominated_blocks()
void set_start_pos(intptr_t pos)
bool Dominates(BlockEntryInstr *other) const
virtual bool CanBecomeDeoptimizationTarget() const
BlockEntryInstr(intptr_t block_id, intptr_t try_index, intptr_t deopt_id, intptr_t stack_depth)
void ReplaceAsPredecessorWith(BlockEntryInstr *new_block)
void set_postorder_number(intptr_t number)
virtual BlockEntryInstr * PredecessorAt(intptr_t index) const =0
bool IsLoopHeader() const
void ClearAllInstructions()
virtual TokenPosition token_pos() const
void set_last_instruction(Instruction *instr)
intptr_t stack_depth() const
bool DiscoverBlock(BlockEntryInstr *predecessor, GrowableArray< BlockEntryInstr * > *preorder, GrowableArray< intptr_t > *parent)
intptr_t start_pos() const
Instruction * last_instruction() const
const GrowableArray< Definition * > * initial_definitions() const
virtual BlockEntryWithInitialDefs * AsBlockEntryWithInitialDefs()
BlockEntryWithInitialDefs(intptr_t block_id, intptr_t try_index, intptr_t deopt_id, intptr_t stack_depth)
void PrintInitialDefinitionsTo(BaseTextBuffer *f, std::function< void(BaseTextBuffer *f)> callback) const
virtual void PrintBlockHeaderTo(BaseTextBuffer *f) const
GrowableArray< Definition * > * initial_definitions()
virtual const BlockEntryWithInitialDefs * AsBlockEntryWithInitialDefs() const
virtual bool ComputeCanDeoptimize() const
virtual bool HasUnknownSideEffects() const
virtual Representation representation() const
BoolToIntInstr(Value *value)
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual bool ComputeCanDeoptimize() const
virtual bool HasUnknownSideEffects() const
BooleanNegateInstr(Value *value)
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
virtual bool ComputeCanDeoptimize() const
virtual TokenPosition token_pos() const
virtual intptr_t DeoptimizationTarget() const
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(BoxInstr, TemplateDefinition, FIELD_LIST) protected
Representation from_representation() const
virtual bool AttributesEqual(const Instruction &other) const
BoxInt32Instr(Value *value)
BoxInt64Instr(Value *value)
BoxInteger32Instr(Representation representation, Value *value)
BoxIntegerInstr(Representation representation, Value *value)
virtual bool CanTriggerGC() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
intptr_t InputCount() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual bool AttributesEqual(const Instruction &other) const
virtual intptr_t DeoptimizationTarget() const
BoxLanesInstr(Representation from_representation, Value *x, Value *y)
virtual TokenPosition token_pos() const
virtual bool ComputeCanDeoptimize() const
BoxLanesInstr(Representation from_representation, Value *x, Value *y, Value *z, Value *w)
Representation from_representation() const
BoxSmallIntInstr(Representation rep, Value *value)
virtual bool ValueFitsSmi() const
BoxUint32Instr(Value *value)
virtual void CopyDeoptIdFrom(const Instruction &instr)
TargetEntryInstr ** false_successor_address()
TargetEntryInstr * false_successor() const
intptr_t InputCount() const
void set_constant_target(TargetEntryInstr *target)
virtual void SetMoveArguments(MoveArgumentsArray *move_arguments)
virtual bool MayThrow() const
virtual MoveArgumentsArray * GetMoveArguments() const
TargetEntryInstr ** true_successor_address()
virtual bool has_inlining_id() const
virtual void RawSetInputAt(intptr_t i, Value *value)
virtual bool ComputeCanDeoptimize() const
virtual intptr_t inlining_id() const
TargetEntryInstr * constant_target() const
virtual intptr_t DeoptimizationTarget() const
virtual void set_inlining_id(intptr_t value)
virtual bool HasUnknownSideEffects() const
TargetEntryInstr * true_successor() const
ComparisonInstr * comparison() const
virtual Representation RequiredInputRepresentation(intptr_t i) const
Value * InputAt(intptr_t i) const
BranchInstr(ComparisonInstr *comparison, intptr_t deopt_id)
virtual bool CanCallDart() const
virtual TokenPosition token_pos() const
virtual bool CanBecomeDeoptimizationTarget() const
virtual bool ComputeCanDeoptimize() const
virtual void SetIdentity(AliasIdentity identity)
virtual bool ComputeCanDeoptimizeAfterCall() const
virtual bool HasUnknownSideEffects() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t idx) const
virtual AliasIdentity Identity() const
virtual bool CanBecomeDeoptimizationTarget() const
virtual Representation representation() const
virtual bool MayCreateUnsafeUntaggedPointer() const
virtual bool CanCallDart() const
CalculateElementAddressInstr(Value *base, Value *index, intptr_t index_scale, Value *offset)
virtual bool MayCreateUnsafeUntaggedPointer() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
intptr_t index_scale() const
virtual bool HasUnknownSideEffects() const
virtual bool AllowsCSE() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
virtual bool AttributesEqual(const Instruction &other) const
virtual bool ComputeCanDeoptimize() const
Call1ArgStubInstr(const InstructionSource &source, StubId stub_id, Value *operand, intptr_t deopt_id)
virtual intptr_t NumberOfInputsConsumedBeforeCall() const
virtual TokenPosition token_pos() const
virtual bool ComputeCanDeoptimize() const
DECLARE_INSTRUCTION(Call1ArgStub)
virtual bool HasUnknownSideEffects() const
virtual bool CanCallDart() const
virtual bool ComputeCanDeoptimizeAfterCall() const
void Write(FlowGraphSerializer *s) const
bool ReceiverIs(intptr_t cid) const
bool ReceiverIsSmiOrMint() const
static const CallTargets * CreateMonomorphic(Zone *zone, intptr_t receiver_cid, const Function &target)
const Function & MostPopularTarget() const
static const CallTargets * Create(Zone *zone, const ICData &ic_data)
TargetInfo * TargetAt(int i) const
bool HasSingleTarget() const
static const CallTargets * CreateAndExpand(Zone *zone, const ICData &ic_data)
intptr_t AggregateCallCount() const
const Function & FirstTarget() const
StaticTypeExactnessState MonomorphicExactness() const
bool HasSingleRecognizedTarget() const
virtual bool ComputeCanDeoptimize() const
Value * rhs_index() const
CaseInsensitiveCompareInstr(Value *str, Value *lhs_index, Value *rhs_index, Value *length, bool handle_surrogates, intptr_t cid)
intptr_t class_id() const
Value * lhs_index() const
virtual Representation representation() const
virtual bool AttributesEqual(const Instruction &other) const
intptr_t index_scale() const
const LocalVariable * exception_var() const
CatchBlockEntryInstr(bool is_generated, intptr_t block_id, intptr_t try_index, GraphEntryInstr *graph_entry, const Array &handler_types, intptr_t catch_try_index, bool needs_stacktrace, intptr_t deopt_id, const LocalVariable *exception_var, const LocalVariable *stacktrace_var, const LocalVariable *raw_exception_var, const LocalVariable *raw_stacktrace_var)
const LocalVariable * raw_stacktrace_var() const
virtual void ClearPredecessors()
virtual BlockEntryInstr * PredecessorAt(intptr_t index) const
virtual void AddPredecessor(BlockEntryInstr *predecessor)
intptr_t catch_try_index() const
const Array & catch_handler_types() const
const LocalVariable * stacktrace_var() const
bool needs_stacktrace() const
bool is_generated() const
const LocalVariable * raw_exception_var() const
GraphEntryInstr * graph_entry() const
virtual bool ComputeCanDeoptimize() const
virtual bool AttributesEqual(const Instruction &other) const
CheckArrayBoundInstr(Value *length, Value *index, intptr_t deopt_id)
CheckBoundBaseInstr(Value *length, Value *index, intptr_t deopt_id)
DECLARE_ABSTRACT_INSTRUCTION(CheckBoundBase)
const CidRangeValue & cids() const
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(CheckClassIdInstr, TemplateInstruction, FIELD_LIST) private DISALLOW_COPY_AND_ASSIGN(CheckClassIdInstr)
virtual bool AllowsCSE() const
virtual bool HasUnknownSideEffects() const
virtual bool AttributesEqual(const Instruction &other) const
CheckClassIdInstr(Value *value, CidRangeValue cids, intptr_t deopt_id)
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(CheckClassInstr, TemplateInstruction, FIELD_LIST) private void EmitBitTest(FlowGraphCompiler *compiler, intptr_t min, intptr_t max, intptr_t mask, compiler::Label *deopt)
void EmitNullCheck(FlowGraphCompiler *compiler, compiler::Label *deopt)
virtual TokenPosition token_pos() const
const Cids & cids() const
DISALLOW_COPY_AND_ASSIGN(CheckClassInstr)
virtual bool HasUnknownSideEffects() const
virtual bool AllowsCSE() const
virtual Value * InputAt(intptr_t i) const
CheckConditionInstr(ComparisonInstr *comparison, intptr_t deopt_id)
virtual void CopyDeoptIdFrom(const Instruction &instr)
virtual bool MayThrow() const
virtual bool AllowsCSE() const
virtual intptr_t InputCount() const
ComparisonInstr * comparison() const
DISALLOW_COPY_AND_ASSIGN(CheckConditionInstr)
virtual bool AttributesEqual(const Instruction &other) const
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(CheckConditionInstr, Instruction, FIELD_LIST) DECLARE_EXTRA_SERIALIZATION private
virtual bool HasUnknownSideEffects() const
virtual bool AttributesEqual(const Instruction &other) const
CheckEitherNonSmiInstr(Value *left, Value *right, intptr_t deopt_id)
virtual bool UseSharedSlowPathStub(bool is_optimizing) const
virtual bool ComputeCanDeoptimizeAfterCall() const
CheckNullInstr(Value *value, const String &function_name, intptr_t deopt_id, const InstructionSource &source, ExceptionType exception_type=kNoSuchMethod)
virtual bool CanBecomeDeoptimizationTarget() const
const String & function_name() const
virtual TokenPosition token_pos() const
ExceptionType exception_type() const
virtual bool ComputeCanDeoptimize() const
virtual TokenPosition token_pos() const
CheckSmiInstr(Value *value, intptr_t deopt_id, const InstructionSource &source)
virtual bool AttributesEqual(const Instruction &other) const
virtual TokenPosition token_pos() const
virtual bool ComputeCanDeoptimizeAfterCall() const
CheckStackOverflowInstr(const InstructionSource &source, intptr_t stack_depth, intptr_t loop_depth, intptr_t deopt_id, Kind kind)
virtual bool UseSharedSlowPathStub(bool is_optimizing) const
virtual bool HasUnknownSideEffects() const
intptr_t stack_depth() const
virtual bool CanEliminate(const BlockEntryInstr *block) const
intptr_t loop_depth() const
virtual bool ComputeCanDeoptimizeAfterCall() const
CheckWritableInstr(Value *receiver, intptr_t deopt_id, const InstructionSource &source, Kind kind=Kind::kWriteUnmodifiableTypedData)
virtual bool ComputeCanDeoptimize() const
virtual bool AttributesEqual(const Instruction &other) const
static bool ContainsCid(const CidRangeVector &ranges, intptr_t cid)
void Sort(int compare(CidRange *const *a, CidRange *const *b))
bool HasClassId(intptr_t cid) const
static Cids * CreateMonomorphic(Zone *zone, intptr_t cid)
intptr_t MonomorphicReceiverCid() const
static Cids * CreateForArgument(Zone *zone, const BinaryFeedback &binary_feedback, int argument_number)
void SetLength(intptr_t len)
intptr_t ComputeLowestCid() const
CidRange * At(int index) const
intptr_t ComputeHighestCid() const
GrowableArray< CidRange * > cid_ranges_
void Add(CidRange *target)
bool Equals(const Cids &other) const
bool IsMonomorphic() const
CidRange & operator[](intptr_t index) const
intptr_t target_instance_size() const
intptr_t NumTypeArguments() const
virtual TokenPosition token_pos() const
const ZoneGrowableArray< const Slot * > & context_slots() const
virtual intptr_t NumberOfInputsConsumedBeforeCall() const
virtual bool ComputeCanDeoptimizeAfterCall() const
Value * context_value() const
virtual bool ComputeCanDeoptimize() const
virtual bool HasUnknownSideEffects() const
CloneContextInstr(const InstructionSource &source, Value *context_value, const ZoneGrowableArray< const Slot * > &context_slots, intptr_t deopt_id)
virtual intptr_t CallCount() const
virtual bool HasUnknownSideEffects() const
ClosureCallInstr(const Function &target_function, InputsArray &&inputs, intptr_t type_args_len, const Array &argument_names, const InstructionSource &source, intptr_t deopt_id)
virtual void NegateComparison()
virtual bool CanBecomeDeoptimizationTarget() const
void set_operation_cid(intptr_t value)
bool IsComparisonWithConstant(Value **other_operand, ConstantInstr **constant_operand)
intptr_t operation_cid() const
virtual bool AttributesEqual(const Instruction &other) const
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(ComparisonInstr, Definition, FIELD_LIST) protected
virtual intptr_t DeoptimizationTarget() const
virtual TokenPosition token_pos() const
static CompileType Object()
static CompileType FromRepresentation(Representation rep)
static CompileType FromUnboxedRepresentation(Representation rep)
static constexpr intptr_t kNumPasses
static CompilerState & Current()
const Object & value() const
void EmitMoveToLocation(FlowGraphCompiler *compiler, const Location &destination, Register tmp=kNoRegister, intptr_t pair_index=0)
ConstantInstr(const Object &value)
PRINT_OPERANDS_TO_SUPPORT DECLARE_ATTRIBUTE & value()
bool HasZeroRepresentation() const
virtual TokenPosition token_pos() const
virtual bool ComputeCanDeoptimize() const
virtual bool ComputeCanDeoptimize() const
void set_target(TargetEntryInstr *target)
TargetEntryInstr * target() const
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(ConstraintInstr, TemplateDefinition, FIELD_LIST) DECLARE_EXTRA_SERIALIZATION private DISALLOW_COPY_AND_ASSIGN(ConstraintInstr)
ConstraintInstr(Value *value, Range *constraint)
virtual bool HasUnknownSideEffects() const
virtual bool AttributesEqual(const Instruction &other) const
Range * constraint() const
virtual const Slot * SlotForInput(intptr_t pos)
virtual bool WillAllocateNewOrRemembered() const
virtual bool HasUnknownSideEffects() const
CreateArrayInstr(const InstructionSource &source, Value *type_arguments, Value *num_elements, intptr_t deopt_id)
Value * type_arguments() const
virtual Value * num_elements() const
virtual intptr_t InputCount() const
virtual Value * InputAt(intptr_t i) const
virtual bool AttributesEqual(const Instruction &other) const
DartReturnInstr(const InstructionSource &source, Value *value, intptr_t deopt_id, Representation representation=kTagged)
virtual intptr_t DeoptimizationTarget() const
virtual Representation representation() const
virtual Representation RequiredInputRepresentation(intptr_t index) const
virtual bool CanBecomeDeoptimizationTarget() const
virtual void RawSetInputAt(intptr_t i, Value *value)
virtual bool HasUnknownSideEffects() const
virtual bool ComputeCanDeoptimize() const
DebugStepCheckInstr(const InstructionSource &source, UntaggedPcDescriptors::Kind stub_kind, intptr_t deopt_id)
Value * env_use_list() const
PRINT_OPERANDS_TO_SUPPORT PRINT_TO_SUPPORT bool UpdateType(CompileType new_type)
virtual AliasIdentity Identity() const
void SetReplacement(Definition *other)
Value * input_use_list() const
virtual CompileType ComputeType() const
Definition * Replacement()
virtual bool CanEliminate(const BlockEntryInstr *block) const
intptr_t location_count() const
void AddEnvUse(Value *value)
void set_temp_index(intptr_t index)
void set_type(CompileType *type)
virtual intptr_t CallCount() const
virtual bool MayCreateUnsafeUntaggedPointer() const
bool HasPairRepresentation() const
virtual Definition * AsDefinition()
Definition(intptr_t deopt_id=DeoptId::kNone)
intptr_t vreg(intptr_t index) const
Definition(const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
void AddInputUse(Value *value)
intptr_t temp_index() const
virtual bool RecomputeType()
void set_ssa_temp_index(intptr_t index)
void set_input_use_list(Value *head)
virtual const Definition * AsDefinition() const
virtual void SetIdentity(AliasIdentity identity)
virtual bool CanReplaceWithConstant() const
ValueListIterable input_uses() const
intptr_t ssa_temp_index() const
void set_env_use_list(Value *head)
static constexpr intptr_t kNone
virtual bool AttributesEqual(const Instruction &other) const
virtual bool ComputeCanDeoptimize() const
DeoptimizeInstr(ICData::DeoptReasonId deopt_reason, intptr_t deopt_id)
virtual bool HasUnknownSideEffects() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t idx) const
virtual bool CanBecomeDeoptimizationTarget() const
virtual intptr_t DeoptimizationTarget() const
const compiler::TableSelector * selector() const
const char * selector_name() const
DispatchTableCallInstr(const InstructionSource &source, const Function &interface_target, const compiler::TableSelector *selector, InputsArray &&arguments, intptr_t type_args_len, const Array &argument_names)
virtual bool AttributesEqual(const Instruction &other) const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual bool ComputeCanDeoptimize() const
MethodRecognizer::Kind op_kind() const
DoubleTestOpInstr(MethodRecognizer::Kind op_kind, Value *value, intptr_t deopt_id, const InstructionSource &source)
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual Representation representation() const
virtual intptr_t DeoptimizationTarget() const
virtual bool AttributesEqual(const Instruction &other) const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
DoubleToFloatInstr(Value *value, intptr_t deopt_id, SpeculativeMode speculative_mode=kGuardInputs)
virtual intptr_t DeoptimizationTarget() const
virtual bool AttributesEqual(const Instruction &other) const
MethodRecognizer::Kind recognized_kind() const
virtual bool HasUnknownSideEffects() const
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(DoubleToIntegerInstr, TemplateDefinition, FIELD_LIST) private DISALLOW_COPY_AND_ASSIGN(DoubleToIntegerInstr)
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t idx) const
virtual bool ComputeCanDeoptimize() const
DoubleToIntegerInstr(Value *value, MethodRecognizer::Kind recognized_kind, intptr_t deopt_id)
virtual intptr_t DeoptimizationTarget() const
DoubleToSmiInstr(Value *value, intptr_t deopt_id)
virtual bool AttributesEqual(const Instruction &other) const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual bool ComputeCanDeoptimize() const
DISALLOW_COPY_AND_ASSIGN(DropTempsInstr)
virtual bool HasUnknownSideEffects() const
intptr_t num_temps() const
DropTempsInstr(intptr_t num_temps, Value *value)
virtual TokenPosition token_pos() const
virtual Value * InputAt(intptr_t i) const
virtual bool ComputeCanDeoptimize() const
virtual bool MayThrow() const
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(DropTempsInstr, Definition, FIELD_LIST) private
T & operator[](intptr_t i)
const T & operator[](intptr_t i) const
void SetAt(intptr_t i, const T &val)
T & operator[](intptr_t i)
const T & At(intptr_t i) const
const T & operator[](intptr_t i) const
void SetCurrentValue(Value *value)
Value * CurrentValue() const
Location CurrentLocation() const
DeepIterator(Environment *environment)
void SetCurrentLocation(Location loc)
ShallowIterator(Environment *environment)
Environment * environment() const
void SetCurrentLocation(Location loc)
ShallowIterator(const ShallowIterator &other)
ShallowIterator & operator=(const ShallowIterator &other)
Value * CurrentValue() const
Location CurrentLocation() const
void SetCurrentValue(Value *value)
intptr_t CountArgsPushed()
Location LocationAt(intptr_t index) const
intptr_t fixed_parameter_count() const
intptr_t LazyDeoptPruneCount() const
void PrintTo(BaseTextBuffer *f) const
void set_locations(Location *locations)
void MarkAsLazyDeoptToBeforeDeoptId()
const Function & function() const
const char * ToCString() const
intptr_t GetDeoptId() const
bool LazyDeoptToBeforeDeoptId() const
Environment * Outermost()
Value * ValueAt(intptr_t ix) const
Environment * DeepCopy(Zone *zone) const
Environment * outer() const
Environment * GetLazyDeoptEnv(Zone *zone)
Value * ValueAtUseIndex(intptr_t index) const
virtual bool AttributesEqual(const Instruction &other) const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
virtual bool ComputeCanDeoptimize() const
EqualityCompareInstr(const InstructionSource &source, Token::Kind kind, Value *left, Value *right, intptr_t cid, intptr_t deopt_id, bool null_aware=false, SpeculativeMode speculative_mode=kGuardInputs)
bool is_null_aware() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
void set_null_aware(bool value)
intptr_t CompoundReturnTypedDataIndex() const
DISALLOW_COPY_AND_ASSIGN(FfiCallInstr)
FfiCallInstr(intptr_t deopt_id, const compiler::ffi::CallMarshaller &marshaller, bool is_leaf, InputsArray &&inputs)
virtual bool MayThrow() const
virtual bool HasUnknownSideEffects() const
static intptr_t InputCountForMarshaller(const compiler::ffi::CallMarshaller &marshaller)
static bool CanExecuteGeneratedCodeInSafepoint()
virtual bool MayCreateUnsafeUntaggedPointer() const
virtual bool CanCallDart() const
virtual bool ComputeCanDeoptimize() const
virtual bool ComputeCanDeoptimizeAfterCall() const
Token::Kind op_kind() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual Representation representation() const
FloatCompareInstr(Token::Kind op_kind, Value *left, Value *right)
virtual bool AttributesEqual(const Instruction &other) const
virtual bool AttributesEqual(const Instruction &other) const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual intptr_t DeoptimizationTarget() const
FloatToDoubleInstr(Value *value, intptr_t deopt_id)
virtual bool ComputeCanDeoptimize() const
void set_block_order(const GrowableArray< BlockEntryInstr * > &block_order)
FlowGraphVisitor(const GrowableArray< BlockEntryInstr * > &block_order)
ForwardInstructionIterator * current_iterator() const
virtual ~FlowGraphVisitor()
ForwardInstructionIterator * current_iterator_
ForwardInstructionIterator(const ForwardInstructionIterator &other)=default
ForwardInstructionIterator & operator++()
ForwardInstructionIterator()
Instruction * operator*() const
ForwardInstructionIterator(BlockEntryInstr *block_entry)
bool operator!=(const ForwardInstructionIterator &other) const
Instruction * Current() const
bool operator==(const ForwardInstructionIterator &other) const
void RemoveCurrentFromGraph()
ForwardInstructionIterator & operator=(const ForwardInstructionIterator &other)=default
GraphEntryInstr * graph_entry() const
virtual BlockEntryInstr * PredecessorAt(intptr_t index) const
virtual void ClearPredecessors()
virtual void AddPredecessor(BlockEntryInstr *predecessor)
FunctionEntryInstr(GraphEntryInstr *graph_entry, intptr_t block_id, intptr_t try_index, intptr_t deopt_id)
GenericCheckBoundInstr(Value *length, Value *index, intptr_t deopt_id)
virtual intptr_t DeoptimizationTarget() const
virtual bool MayThrow() const
virtual bool AttributesEqual(const Instruction &other) const
static bool UseUnboxedRepresentation()
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual bool UseSharedSlowPathStub(bool is_optimizing) const
virtual bool ComputeCanDeoptimizeAfterCall() const
virtual bool ComputeCanDeoptimize() const
virtual Representation representation() const
ParallelMoveInstr * parallel_move() const
bool HasNonRedundantParallelMove() const
bool HasParallelMove() const
JoinEntryInstr * successor() const
void adjust_edge_weight(double scale_factor)
double edge_weight() const
void set_edge_weight(double weight)
virtual bool HasUnknownSideEffects() const
virtual bool ComputeCanDeoptimize() const
virtual intptr_t DeoptimizationTarget() const
DISALLOW_COPY_AND_ASSIGN(GotoInstr)
void set_successor(JoinEntryInstr *successor)
void set_block(BlockEntryInstr *block)
virtual bool CanBecomeDeoptimizationTarget() const
GotoInstr(JoinEntryInstr *entry, intptr_t deopt_id)
virtual TokenPosition token_pos() const
ParallelMoveInstr * GetParallelMove()
intptr_t fixed_slot_count() const
intptr_t entry_count() const
void AddCatchEntry(CatchBlockEntryInstr *entry)
FunctionEntryInstr * normal_entry() const
intptr_t spill_slot_count() const
FunctionEntryInstr * unchecked_entry() const
void AddIndirectEntry(IndirectEntryInstr *entry)
void set_unchecked_entry(FunctionEntryInstr *target)
const ParsedFunction & parsed_function() const
bool HasSingleEntryPoint() const
void set_normal_entry(FunctionEntryInstr *entry)
const GrowableArray< IndirectEntryInstr * > & indirect_entries() const
virtual BlockEntryInstr * PredecessorAt(intptr_t index) const
void set_fixed_slot_count(intptr_t count)
virtual void ClearPredecessors()
virtual void AddPredecessor(BlockEntryInstr *predecessor)
void set_osr_entry(OsrEntryInstr *entry)
OsrEntryInstr * osr_entry() const
void set_spill_slot_count(intptr_t count)
void set_entry_count(intptr_t count)
const GrowableArray< CatchBlockEntryInstr * > & catch_entries() const
GuardFieldClassInstr(Value *value, const Field &field, intptr_t deopt_id)
virtual bool ComputeCanDeoptimize() const
virtual bool CanBecomeDeoptimizationTarget() const
const Field & field() const
GuardFieldInstr(Value *value, const Field &field, intptr_t deopt_id)
GuardFieldLengthInstr(Value *value, const Field &field, intptr_t deopt_id)
GuardFieldTypeInstr(Value *value, const Field &field, intptr_t deopt_id)
virtual Representation representation() const
virtual CompileType ComputeType() const
virtual bool AttributesEqual(const Instruction &other) const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
HashDoubleOpInstr(Value *value, intptr_t deopt_id)
virtual intptr_t DeoptimizationTarget() const
static HashDoubleOpInstr * Create(Value *value, intptr_t deopt_id)
HashIntegerOpInstr(Value *value, bool smi, intptr_t deopt_id)
virtual Representation representation() const
virtual CompileType ComputeType() const
static HashIntegerOpInstr * Create(Value *value, bool smi, intptr_t deopt_id)
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual bool AttributesEqual(const Instruction &other) const
virtual intptr_t DeoptimizationTarget() const
bool InstanceOfHasClassRange(const AbstractType &type, intptr_t *lower_limit, intptr_t *upper_limit)
bool CanUseGenericSubtypeRangeCheckFor(const AbstractType &type)
const CidRangeVector & SubtypeRangesForClass(const Class &klass, bool include_abstract, bool exclude_null)
static constexpr intptr_t kNoCompatibleTAVOffset
HierarchyInfo(Thread *thread)
bool CanUseRecordSubtypeRangeCheckFor(const AbstractType &type)
bool CanUseSubtypeRangeCheckFor(const AbstractType &type)
virtual bool AllowsCSE() const
virtual bool HasUnknownSideEffects() const
Value * InputAt(intptr_t i) const
virtual void CopyDeoptIdFrom(const Instruction &instr)
virtual bool CanCallDart() const
ComparisonInstr * comparison() const
DISALLOW_COPY_AND_ASSIGN(IfThenElseInstr)
intptr_t if_false() const
virtual bool MayThrow() const
virtual bool ComputeCanDeoptimize() const
virtual bool AttributesEqual(const Instruction &other) const
virtual bool CanBecomeDeoptimizationTarget() const
IfThenElseInstr(ComparisonInstr *comparison, Value *if_true, Value *if_false, intptr_t deopt_id)
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(IfThenElseInstr, Definition, FIELD_LIST) DECLARE_EXTRA_SERIALIZATION private
virtual intptr_t DeoptimizationTarget() const
virtual Representation RequiredInputRepresentation(intptr_t i) const
IndirectEntryInstr(intptr_t block_id, intptr_t indirect_id, intptr_t try_index, intptr_t deopt_id)
virtual bool ComputeCanDeoptimize() const
virtual intptr_t SuccessorCount() const
void AddSuccessor(TargetEntryInstr *successor)
virtual bool CanBecomeDeoptimizationTarget() const
virtual TargetEntryInstr * SuccessorAt(intptr_t index) const
virtual bool HasUnknownSideEffects() const
IndirectGotoInstr(intptr_t target_count, Value *target_index)
void set_ic_data(const ICData *value)
CompileType * result_type() const
virtual intptr_t DeoptimizationTarget() const
DECLARE_ABSTRACT_INSTRUCTION(InstanceCallBase)
void set_result_type(CompileType *result_type)
virtual bool CanBecomeDeoptimizationTarget() const
Code::EntryKind entry_kind() const
void set_has_unique_selector(bool b)
const ICData * ic_data() const
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(InstanceCallBaseInstr, TemplateDartCall, FIELD_LIST) protected void set_ic_data(ICData *value)
void set_receiver_is_not_smi(bool value)
const Function & tearoff_interface_target() const
InstanceCallBaseInstr(const InstructionSource &source, const String &function_name, Token::Kind token_kind, InputsArray &&arguments, intptr_t type_args_len, const Array &argument_names, const ICData *ic_data, intptr_t deopt_id, const Function &interface_target, const Function &tearoff_interface_target)
const Function & interface_target() const
bool is_call_on_this() const
void SetResultType(Zone *zone, CompileType new_type)
Token::Kind token_kind() const
void mark_as_call_on_this()
bool receiver_is_not_smi() const
virtual bool HasUnknownSideEffects() const
intptr_t result_cid() const
void set_entry_kind(Code::EntryKind value)
const String & function_name() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t idx) const
bool has_unique_selector() const
InstanceCallInstr(const InstructionSource &source, const String &function_name, Token::Kind token_kind, InputsArray &&arguments, intptr_t type_args_len, const Array &argument_names, intptr_t checked_argument_count, const ZoneGrowableArray< const ICData * > &ic_data_array, intptr_t deopt_id, const Function &interface_target=Function::null_function(), const Function &tearoff_interface_target=Function::null_function())
virtual intptr_t CallCount() const
DISALLOW_COPY_AND_ASSIGN(InstanceCallInstr)
void SetTargets(const CallTargets *targets)
void set_receivers_static_type(const AbstractType *receiver_type)
InstanceCallInstr(const InstructionSource &source, const String &function_name, Token::Kind token_kind, InputsArray &&arguments, intptr_t type_args_len, const Array &argument_names, intptr_t checked_argument_count, intptr_t deopt_id, const Function &interface_target=Function::null_function(), const Function &tearoff_interface_target=Function::null_function())
void SetBinaryFeedback(const class BinaryFeedback *binary)
InstanceOfInstr(const InstructionSource &source, Value *value, Value *instantiator_type_arguments, Value *function_type_arguments, const AbstractType &type, intptr_t deopt_id)
virtual bool ComputeCanDeoptimize() const
virtual bool ComputeCanDeoptimizeAfterCall() const
const AbstractType & type() const
virtual bool HasUnknownSideEffects() const
virtual TokenPosition token_pos() const
Value * function_type_arguments() const
Value * instantiator_type_arguments() const
static intptr_t ElementSizeFor(intptr_t cid)
Value * type_arguments() const
Value * function_type_arguments() const
InstantiateTypeArgumentsInstr(const InstructionSource &source, Value *instantiator_type_arguments, Value *function_type_arguments, Value *type_arguments, const Class &instantiator_class, const Function &function, intptr_t deopt_id)
virtual bool ComputeCanDeoptimizeAfterCall() const
bool CanShareFunctionTypeArguments(bool *with_runtime_check=nullptr) const
virtual TokenPosition token_pos() const
virtual intptr_t NumberOfInputsConsumedBeforeCall() const
virtual bool HasUnknownSideEffects() const
const Class & instantiator_class() const
const Function & function() const
const Code & GetStub() const
virtual bool ComputeCanDeoptimize() const
bool CanShareInstantiatorTypeArguments(bool *with_runtime_check=nullptr) const
virtual bool HasUnknownSideEffects() const
Value * function_type_arguments() const
const AbstractType & type() const
virtual bool ComputeCanDeoptimizeAfterCall() const
virtual bool ComputeCanDeoptimize() const
virtual TokenPosition token_pos() const
InstantiateTypeInstr(const InstructionSource &source, const AbstractType &type, Value *instantiator_type_arguments, Value *function_type_arguments, intptr_t deopt_id)
virtual intptr_t NumberOfInputsConsumedBeforeCall() const
InstructionIndexedPropertyIterable(const Instruction *instr)
virtual ~InstructionVisitor()
bool WasEliminated() const
void InsertBefore(Instruction *next)
virtual bool AttributesEqual(const Instruction &other) const
virtual void Accept(InstructionVisitor *visitor)=0
Instruction * next() const
virtual intptr_t InputCount() const =0
intptr_t GetDeoptId() const
virtual bool UseSharedSlowPathStub(bool is_optimizing) const
virtual void RawSetInputAt(intptr_t i, Value *value)=0
void set_previous(Instruction *instr)
void SetEnvironment(Environment *deopt_env)
void InheritDeoptTargetAfter(FlowGraph *flow_graph, Definition *call, Definition *result)
void LinkTo(Instruction *next)
Instruction(const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
virtual bool MayThrow() const =0
void InheritDeoptTarget(Zone *zone, Instruction *other)
virtual bool HasUnknownSideEffects() const =0
virtual Value * InputAt(intptr_t i) const =0
void Goto(JoinEntryInstr *entry)
virtual bool ComputeCanDeoptimizeAfterCall() const
virtual BlockEntryInstr * SuccessorAt(intptr_t index) const
virtual BlockEntryInstr * GetBlock()
void ReadExtraWithoutInputs(FlowGraphDeserializer *d)
virtual void CopyDeoptIdFrom(const Instruction &instr)
virtual bool ComputeCanDeoptimize() const =0
virtual bool CanBecomeDeoptimizationTarget() const
Environment * env() const
virtual LocationSummary * MakeLocationSummary(Zone *zone, bool is_optimizing) const =0
friend class StrictCompareInstr
virtual void EmitNativeCode(FlowGraphCompiler *compiler)
bool HasUnmatchedInputRepresentations() const
const char * ToCString() const
virtual uword Hash() const
virtual void SetMoveArguments(MoveArgumentsArray *move_arguments)
Instruction * AppendInstruction(Instruction *tail)
void InitializeLocationSummary(Zone *zone, bool optimizing)
void CheckField(const Field &field) const
virtual TokenPosition token_pos() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual void ReplaceInputsWithMoveArguments(MoveArgumentsArray *move_arguments)
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
bool HasPassSpecificId(CompilerPass::Id pass) const
virtual bool MayHaveVisibleEffect() const
virtual intptr_t ArgumentCount() const
void set_next(Instruction *instr)
InstructionIndexedPropertyIterable< SuccessorsTrait > SuccessorsIterable
virtual intptr_t statistics_tag() const
void WriteExtraWithoutInputs(FlowGraphSerializer *s)
static const intptr_t kInstructionAttrs[kNumInstructions]
bool IsDominatedBy(Instruction *dom)
bool Equals(const Instruction &other) const
virtual intptr_t DeoptimizationTarget() const
static const ICData * GetICData(const ZoneGrowableArray< const ICData * > &ic_data_array, intptr_t deopt_id, bool is_static_call)
Definition * ArgumentAt(intptr_t index) const
void Unsupported(FlowGraphCompiler *compiler)
Instruction(intptr_t deopt_id=DeoptId::kNone)
bool NeedsEnvironment() const
virtual Instruction * Canonicalize(FlowGraph *flow_graph)
virtual Representation representation() const
SuccessorsIterable successors() const
bool CanDeoptimize() const
virtual intptr_t NumberOfInputsConsumedBeforeCall() const
friend class ComparisonInstr
intptr_t GetPassSpecificId(CompilerPass::Id pass) const
DECLARE_INSTRUCTION_TYPE_CHECK(BlockEntryWithInitialDefs, BlockEntryWithInitialDefs) template< typename T > T *Cast()
virtual bool AllowsCSE() const
void RepairArgumentUsesInEnvironment() const
void ReplaceInEnvironment(Definition *current, Definition *replacement)
InstructionIndexedPropertyIterable< InputsTrait > InputsIterable
Location::Kind RegisterKindForResult() const
virtual Tag tag() const =0
void SetInputAt(intptr_t i, Value *value)
InstructionSource source() const
Value * ArgumentValueAt(intptr_t index) const
virtual bool has_inlining_id() const
intptr_t deopt_id() const
void InsertAfter(Instruction *prev)
virtual bool CanCallDart() const
virtual intptr_t SuccessorCount() const
Instruction * RemoveFromGraph(bool return_previous=true)
bool HasMoveArguments() const
void SetPassSpecificId(CompilerPass::Id pass, intptr_t id)
SpeculativeMode SpeculativeModeOfInputs() const
virtual MoveArgumentsArray * GetMoveArguments() const
virtual void set_inlining_id(intptr_t value)
static bool SlowPathSharingSupported(bool is_optimizing)
virtual bool CanTriggerGC() const
virtual const char * DebugName() const =0
Instruction * previous() const
static LocationSummary * MakeCallSummary(Zone *zone, const Instruction *instr, LocationSummary *locs=nullptr)
virtual intptr_t inlining_id() const
Int32ToDoubleInstr(Value *value)
virtual bool AttributesEqual(const Instruction &other) const
virtual Representation representation() const
virtual bool ComputeCanDeoptimize() const
virtual bool AttributesEqual(const Instruction &other) const
virtual intptr_t DeoptimizationTarget() const
virtual bool ComputeCanDeoptimize() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
Int64ToDoubleInstr(Value *value, intptr_t deopt_id, SpeculativeMode speculative_mode=kGuardInputs)
virtual Representation representation() const
IntConverterInstr(Representation from, Representation to, Value *value, intptr_t deopt_id)
virtual Representation representation() const
DECLARE_INSTRUCTION(IntConverter)
virtual bool MayCreateUnsafeUntaggedPointer() const
bool is_truncating() const
DECLARE_ATTRIBUTES_NAMED(("from", "to", "is_truncating"),(from(), to(), is_truncating())) PRINT_OPERANDS_TO_SUPPORT DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(IntConverterInstr
virtual intptr_t DeoptimizationTarget() const
virtual bool AttributesEqual(const Instruction &other) const
Representation to() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
Representation from() const
IntToBoolInstr(Value *value)
virtual bool ComputeCanDeoptimize() const
virtual bool HasUnknownSideEffects() const
virtual Representation representation() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual bool AllowsCSE() const
virtual bool AttributesEqual(const Instruction &other) const
virtual intptr_t DeoptimizationTarget() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual Representation representation() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t idx) const
MethodRecognizer::Kind recognized_kind() const
virtual bool MayThrow() const
virtual TokenPosition token_pos() const
virtual bool HasUnknownSideEffects() const
ZoneGrowableArray< PhiInstr * > * phis() const
JoinEntryInstr(intptr_t block_id, intptr_t try_index, intptr_t deopt_id, intptr_t stack_depth=0)
virtual BlockEntryInstr * PredecessorAt(intptr_t index) const
virtual bool HasUnknownSideEffects() const
GrowableArray< BlockEntryInstr * > predecessors_
virtual void ClearPredecessors()
DISALLOW_COPY_AND_ASSIGN(JoinEntryInstr)
virtual CompileType ComputeType() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual Representation representation() const
virtual bool MayThrow() const
intptr_t TargetAddressIndex() const
virtual bool MayCreateUnsafeUntaggedPointer() const
virtual bool HasUnknownSideEffects() const
virtual bool CanCallDart() const
virtual bool ComputeCanDeoptimize() const
virtual bool ComputeCanDeoptimize() const
LoadClassIdInstr(Value *object, Representation representation=kTagged, bool input_can_be_smi=true)
virtual bool AttributesEqual(const Instruction &other) const
virtual Representation representation() const
virtual Representation representation() const
virtual bool ComputeCanDeoptimize() const
intptr_t index_scale() const
bool can_pack_into_smi() const
virtual bool CanTriggerGC() const
intptr_t element_count() const
virtual bool HasUnknownSideEffects() const
LoadCodeUnitsInstr(Value *str, Value *index, intptr_t element_count, intptr_t class_id, const InstructionSource &source)
intptr_t class_id() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
TokenPosition token_pos() const
void set_representation(Representation repr)
bool IsImmutableLengthLoad() const
virtual bool AllowsCSE() const
void set_loads_inner_pointer(InnerPointerAccess value)
const Slot & slot() const
InnerPointerAccess loads_inner_pointer() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
LoadFieldInstr(Value *instance, const Slot &slot, const InstructionSource &source, bool calls_initializer=false, intptr_t deopt_id=DeoptId::kNone)
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(LoadFieldInstr, TemplateLoadField, FIELD_LIST) private DISALLOW_COPY_AND_ASSIGN(LoadFieldInstr)
virtual bool CanTriggerGC() const
LoadFieldInstr(Value *instance, const Slot &slot, InnerPointerAccess loads_inner_pointer, const InstructionSource &source, bool calls_initializer=false, intptr_t deopt_id=DeoptId::kNone)
intptr_t class_id() const
TokenPosition token_pos() const
virtual intptr_t DeoptimizationTarget() const
virtual bool ComputeCanDeoptimize() const
virtual bool HasUnknownSideEffects() const
intptr_t index_scale() const
Representation representation() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual bool HasUnknownSideEffects() const
LoadIndexedUnsafeInstr(Value *index, intptr_t offset, CompileType result_type, Representation representation=kTagged)
Register base_reg() const
virtual Representation representation() const
virtual bool ComputeCanDeoptimize() const
virtual bool AttributesEqual(const Instruction &other) const
LoadLocalInstr(const LocalVariable &local, const InstructionSource &source)
virtual TokenPosition token_pos() const
const LocalVariable & local() const
virtual bool HasUnknownSideEffects() const
virtual bool ComputeCanDeoptimize() const
LoadStaticFieldInstr(const Field &field, const InstructionSource &source, bool calls_initializer=false, intptr_t deopt_id=DeoptId::kNone)
virtual bool AllowsCSE() const
const Field & field() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual bool MayCreateUnsafeUntaggedPointer() const
DECLARE_INSTRUCTION(LoadThread)
virtual bool AttributesEqual(const Instruction &other) const
virtual Representation representation() const
virtual bool ComputeCanDeoptimize() const
virtual bool ComputeCanDeoptimize() const
LoadUntaggedInstr(Value *object, intptr_t offset)
virtual bool HasUnknownSideEffects() const
virtual bool MayCreateUnsafeUntaggedPointer() const
virtual bool AttributesEqual(const Instruction &other) const
virtual Representation representation() const
static Location NoLocation()
bool IsFpuRegister() const
bool IsDoubleStackSlot() const
intptr_t stack_index() const
Register base_reg() const
PairLocation * AsPairLocation() const
bool Equals(Location other) const
bool IsPairLocation() const
bool IsMachineRegister() const
MakePairInstr(Value *x, Value *y)
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual Representation representation() const
virtual bool AttributesEqual(const Instruction &other) const
MakeTempInstr(Zone *zone)
virtual TokenPosition token_pos() const
virtual bool MayThrow() const
virtual bool HasUnknownSideEffects() const
intptr_t FieldOffsetAt(intptr_t i) const
void set_locations(Location *locations)
virtual bool MayThrow() const
AllocationInstr * allocation() const
void mark_visited_for_liveness()
bool was_visited_for_liveness() const
virtual bool ComputeCanDeoptimize() const
const Class & cls() const
intptr_t length_or_shape() const
DISALLOW_COPY_AND_ASSIGN(MaterializeObjectInstr)
MaterializeObjectInstr(AllocationInstr *allocation, const Class &cls, intptr_t length_or_shape, const ZoneGrowableArray< const Slot * > &slots, InputsArray &&values)
virtual bool HasUnknownSideEffects() const
const Location & LocationAt(intptr_t i)
virtual bool CanReplaceWithConstant() const
virtual intptr_t DeoptimizationTarget() const
MathMinMaxInstr(MethodRecognizer::Kind op_kind, Value *left_value, Value *right_value, intptr_t deopt_id, intptr_t result_cid)
intptr_t result_cid() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual Representation representation() const
virtual bool ComputeCanDeoptimize() const
MethodRecognizer::Kind op_kind() const
bool unboxed_inputs() const
classid_t src_cid() const
PRINT_OPERANDS_TO_SUPPORT DECLARE_ATTRIBUTE(element_size())
classid_t dest_cid() const
virtual bool HasUnknownSideEffects() const
intptr_t element_size() const
Value * src_start() const
virtual bool AttributesEqual(const Instruction &other) const
static bool IsArrayTypeSupported(classid_t array_cid)
DISALLOW_COPY_AND_ASSIGN(MemoryCopyInstr)
void EmitLoopCopy(FlowGraphCompiler *compiler, Register dest_reg, Register src_reg, Register length_reg, compiler::Label *done, compiler::Label *copy_forwards=nullptr)
void PrepareLengthRegForLoop(FlowGraphCompiler *compiler, Register length_reg, compiler::Label *done)
virtual bool ComputeCanDeoptimize() const
Value * dest_start() const
MemoryCopyInstr(Value *src, classid_t src_cid, Value *dest, classid_t dest_cid, Value *src_start, Value *dest_start, Value *length, bool unboxed_inputs, bool can_overlap=true)
virtual Representation RequiredInputRepresentation(intptr_t index) const
static bool IsRegisterMove(Location loc)
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(MoveArgumentInstr, TemplateDefinition, FIELD_LIST) DECLARE_EXTRA_SERIALIZATION private
virtual bool HasUnknownSideEffects() const
Location * location_slot()
virtual Representation representation() const
Location location() const
virtual TokenPosition token_pos() const
virtual bool ComputeCanDeoptimize() const
intptr_t sp_relative_index() const
MoveArgumentInstr(Value *value, Representation representation, Location location)
DISALLOW_COPY_AND_ASSIGN(MoveArgumentInstr)
void ClearPending(Location dest)
bool Blocks(Location loc) const
bool IsEliminated() const
MoveOperands & operator=(const MoveOperands &other)
void Write(FlowGraphSerializer *s) const
void set_dest(const Location &value)
MoveOperands(const MoveOperands &other)
MoveOperands(Location dest, Location src)
void set_src(const Location &value)
void set_is_bootstrap_native(bool value)
virtual bool ComputeCanDeoptimize() const
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(NativeCallInstr, TemplateDartCall, FIELD_LIST) private
bool is_auto_scope() const
virtual TokenPosition token_pos() const
DISALLOW_COPY_AND_ASSIGN(NativeCallInstr)
NativeCallInstr(const String &name, const Function &function, bool link_lazily, const InstructionSource &source, InputsArray &&args)
void set_is_auto_scope(bool value)
virtual bool HasUnknownSideEffects() const
bool is_bootstrap_native() const
virtual bool CanCallDart() const
const Function & function() const
NativeFunction native_c_function() const
NativeEntryInstr(const compiler::ffi::CallbackMarshaller &marshaller, GraphEntryInstr *graph_entry, intptr_t block_id, intptr_t try_index, intptr_t deopt_id)
virtual bool MayCreateUnsafeUntaggedPointer() const
NativeParameterInstr(const compiler::ffi::CallbackMarshaller &marshaller, intptr_t def_index)
virtual bool HasUnknownSideEffects() const
virtual bool ComputeCanDeoptimize() const
NativeReturnInstr(Value *typed_data_base, Value *offset, const compiler::ffi::CallbackMarshaller &marshaller)
virtual PRINT_OPERANDS_TO_SUPPORT Representation RequiredInputRepresentation(intptr_t idx) const
virtual Value * InputAt(intptr_t i) const
virtual bool CanBecomeDeoptimizationTarget() const
virtual void RawSetInputAt(intptr_t i, Value *value)
virtual bool AttributesEqual(const Instruction &other) const
NativeReturnInstr(Value *value, const compiler::ffi::CallbackMarshaller &marshaller)
virtual intptr_t InputCount() const
virtual const char * ToCString() const
virtual bool ComputeCanDeoptimize() const
Value * char_code() const
virtual bool AttributesEqual(const Instruction &other) const
OneByteStringFromCharCodeInstr(Value *char_code)
OsrEntryInstr(GraphEntryInstr *graph_entry, intptr_t block_id, intptr_t try_index, intptr_t deopt_id, intptr_t stack_depth)
virtual BlockEntryInstr * PredecessorAt(intptr_t index) const
virtual void ClearPredecessors()
GraphEntryInstr * graph_entry() const
virtual void AddPredecessor(BlockEntryInstr *predecessor)
Location At(intptr_t i) const
virtual bool HasUnknownSideEffects() const
intptr_t NumMoves() const
virtual bool ComputeCanDeoptimize() const
const MoveSchedule & move_schedule() const
const GrowableArray< MoveOperands * > & moves() const
virtual TokenPosition token_pos() const
MoveOperands * AddMove(Location dest, Location src)
MoveOperands * MoveOperandsAt(intptr_t index) const
void set_move_schedule(const MoveSchedule &schedule)
void set_block(BlockEntryInstr *block)
virtual bool HasUnknownSideEffects() const
virtual Representation RequiredInputRepresentation(intptr_t index) const
intptr_t param_index() const
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(ParameterInstr, TemplateDefinition, FIELD_LIST) DECLARE_EXTRA_SERIALIZATION private Location location_
virtual bool ComputeCanDeoptimize() const
const Location & location() const
virtual uword Hash() const
ParameterInstr(BlockEntryInstr *block, intptr_t env_index, intptr_t param_index, const Location &loc, Representation representation)
virtual BlockEntryInstr * GetBlock()
virtual Representation representation() const
DISALLOW_COPY_AND_ASSIGN(ParameterInstr)
JoinEntryInstr * block() const
virtual void set_representation(Representation r)
virtual uword Hash() const
virtual bool HasUnknownSideEffects() const
void set_is_receiver(ReceiverType is_receiver)
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
PhiInstr(JoinEntryInstr *block, intptr_t num_inputs)
virtual Representation RequiredInputRepresentation(intptr_t i) const
BitVector * reaching_defs() const
void set_reaching_defs(BitVector *reaching_defs)
virtual bool MayCreateUnsafeUntaggedPointer() const
virtual bool ComputeCanDeoptimize() const
virtual Representation representation() const
virtual bool MayThrow() const
ReceiverType is_receiver() const
virtual BlockEntryInstr * GetBlock()
PhiInstr * Current() const
PhiIterator(JoinEntryInstr *join)
void set_total_call_count(intptr_t count)
DISALLOW_COPY_AND_ASSIGN(PolymorphicInstanceCallInstr)
intptr_t NumberOfChecks() const
const CallTargets & targets() const
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(PolymorphicInstanceCallInstr, InstanceCallBaseInstr, FIELD_LIST) private
static PolymorphicInstanceCallInstr * FromCall(Zone *zone, InstanceCallBaseInstr *call, const CallTargets &targets, bool complete)
intptr_t total_call_count()
virtual bool HasUnknownSideEffects() const
virtual bool AllowsCSE() const
PureComparison(const InstructionSource &source, Token::Kind kind, intptr_t deopt_id)
virtual bool HasUnknownSideEffects() const
virtual bool AllowsCSE() const
PureDefinition(const InstructionSource &source, intptr_t deopt_id)
PureDefinition(intptr_t deopt_id)
PureInstruction(intptr_t deopt_id)
virtual bool AllowsCSE() const
PureInstruction(const InstructionSource &source, intptr_t deopt_id)
virtual bool HasUnknownSideEffects() const
intptr_t catch_try_index() const
virtual bool ComputeCanDeoptimizeAfterCall() const
virtual bool ComputeCanDeoptimize() const
Value * stacktrace() const
Value * exception() const
virtual bool HasUnknownSideEffects() const
ReThrowInstr(const InstructionSource &source, intptr_t catch_try_index, intptr_t deopt_id, Value *exception, Value *stacktrace)
virtual bool HasUnknownSideEffects() const
virtual bool ComputeCanDeoptimize() const
ReachabilityFenceInstr(Value *value)
virtual bool CanEliminate(const BlockEntryInstr *block) const
RecordCoverageInstr(const Array &coverage_array, intptr_t coverage_index, const InstructionSource &source)
virtual bool HasUnknownSideEffects() const
virtual bool ComputeCanDeoptimize() const
virtual bool MayHaveVisibleEffect() const
intptr_t num_fields() const
bool inserted_by_constant_propagation() const
RedefinitionInstr(Value *value, bool inserted_by_constant_propagation=false)
virtual bool ComputeCanDeoptimize() const
void set_constrained_type(CompileType *type)
virtual bool HasUnknownSideEffects() const
CompileType * constrained_type() const
virtual bool ComputeCanDeoptimize() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
virtual bool AttributesEqual(const Instruction &other) const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
RelationalOpInstr(const InstructionSource &source, Token::Kind kind, Value *left, Value *right, intptr_t cid, intptr_t deopt_id, SpeculativeMode speculative_mode=kGuardInputs)
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
virtual bool ComputeCanDeoptimize() const
virtual bool HasUnknownSideEffects() const
virtual bool MayThrow() const
ReturnBaseInstr(const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
virtual bool ComputeCanDeoptimize() const
ShiftInt64OpInstr(Token::Kind op_kind, Value *left, Value *right, intptr_t deopt_id, Range *right_range=nullptr)
virtual Representation representation() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual bool MayThrow() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
void set_shift_range(Range *shift_range)
ShiftIntegerOpInstr(Token::Kind op_kind, Value *left, Value *right, intptr_t deopt_id, Range *right_range=nullptr)
Range * shift_range() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
virtual bool ComputeCanDeoptimize() const
virtual Representation representation() const
virtual bool MayThrow() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
ShiftUint32OpInstr(Token::Kind op_kind, Value *left, Value *right, intptr_t deopt_id, Range *right_range=nullptr)
static SimdOpInstr * Create(Kind kind, Value *left, Value *right, intptr_t deopt_id)
virtual Value * InputAt(intptr_t i) const
virtual intptr_t DeoptimizationTarget() const
virtual bool AllowsCSE() const
virtual bool MayThrow() const
virtual void RawSetInputAt(intptr_t i, Value *value)
virtual bool ComputeCanDeoptimize() const
static SimdOpInstr * Create(MethodRecognizer::Kind kind, Value *left, Value *right, intptr_t deopt_id)
static SimdOpInstr * Create(MethodRecognizer::Kind kind, Value *left, intptr_t deopt_id)
virtual bool HasUnknownSideEffects() const
virtual bool AttributesEqual(const Instruction &other) const
static const Slot & GetRecordFieldSlot(Thread *thread, intptr_t offset_in_bytes)
Representation representation() const
bool may_contain_inner_pointer() const
static const Slot & GetTypeArgumentsSlotFor(Thread *thread, const Class &cls)
virtual TokenPosition token_pos() const
virtual bool AttributesEqual(const Instruction &other) const
virtual bool ComputeCanDeoptimize() const
SmiToDoubleInstr(Value *value, const InstructionSource &source)
SpeculativeShiftInt64OpInstr(Token::Kind op_kind, Value *left, Value *right, intptr_t deopt_id, Range *right_range=nullptr)
virtual Representation representation() const
virtual bool ComputeCanDeoptimize() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
SpeculativeShiftUint32OpInstr(Token::Kind op_kind, Value *left, Value *right, intptr_t deopt_id, Range *right_range=nullptr)
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual Representation representation() const
DECLARE_EMPTY_SERIALIZATION(SpeculativeShiftUint32OpInstr, ShiftIntegerOpInstr) private DISALLOW_COPY_AND_ASSIGN(SpeculativeShiftUint32OpInstr)
virtual bool ComputeCanDeoptimize() const
const ICData * ic_data() const
StaticCallInstr(const InstructionSource &source, const Function &function, intptr_t type_args_len, const Array &argument_names, InputsArray &&arguments, const ZoneGrowableArray< const ICData * > &ic_data_array, intptr_t deopt_id, ICData::RebindRule rebind_rule)
CompileType * result_type() const
static StaticCallInstr * FromCall(Zone *zone, const C *call, const Function &target, intptr_t call_count)
virtual bool ComputeCanDeoptimizeAfterCall() const
DISALLOW_COPY_AND_ASSIGN(StaticCallInstr)
void SetResultType(Zone *zone, CompileType new_type)
void set_ic_data(const ICData *value)
virtual bool HasUnknownSideEffects() const
intptr_t result_cid() const
void set_is_known_list_constructor(bool value)
virtual bool CanCallDart() const
Code::EntryKind entry_kind() const
virtual intptr_t CallCount() const
virtual bool CanBecomeDeoptimizationTarget() const
void set_entry_kind(Code::EntryKind value)
bool is_known_list_constructor() const
virtual bool ComputeCanDeoptimize() const
virtual void SetIdentity(AliasIdentity identity)
virtual intptr_t DeoptimizationTarget() const
virtual AliasIdentity Identity() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t idx) const
bool IsRecognizedFactory() const
StaticCallInstr(const InstructionSource &source, const Function &function, intptr_t type_args_len, const Array &argument_names, InputsArray &&arguments, intptr_t deopt_id, intptr_t call_count, ICData::RebindRule rebind_rule)
StopInstr(const char *message)
virtual bool ComputeCanDeoptimize() const
DECLARE_INSTRUCTION(Stop)
virtual bool HasUnknownSideEffects() const
const char * message() const
InnerPointerAccess stores_inner_pointer() const
void set_emit_store_barrier(StoreBarrierType value)
void set_stores_inner_pointer(InnerPointerAccess value)
StoreFieldInstr(const Slot &slot, Value *instance, Value *value, StoreBarrierType emit_store_barrier, const InstructionSource &source, Kind kind=Kind::kOther, compiler::Assembler::MemoryOrder memory_order=compiler::Assembler::kRelaxedNonAtomic)
bool ShouldEmitStoreBarrier() const
DISALLOW_COPY_AND_ASSIGN(StoreFieldInstr)
virtual TokenPosition token_pos() const
virtual intptr_t DeoptimizationTarget() const
bool is_initialization() const
virtual bool MayHaveVisibleEffect() const
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(StoreFieldInstr, TemplateInstruction, FIELD_LIST) private intptr_t OffsetInBytes() const
virtual bool HasUnknownSideEffects() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
StoreFieldInstr(const Field &field, Value *instance, Value *value, StoreBarrierType emit_store_barrier, const InstructionSource &source, const ParsedFunction *parsed_function, Kind kind=Kind::kOther)
virtual bool CanTriggerGC() const
StoreFieldInstr(const Slot &slot, Value *instance, Value *value, StoreBarrierType emit_store_barrier, InnerPointerAccess stores_inner_pointer, const InstructionSource &source, Kind kind=Kind::kOther, compiler::Assembler::MemoryOrder memory_order=compiler::Assembler::kRelaxedNonAtomic)
compiler::Assembler::CanBeSmi CanValueBeSmi() const
virtual bool ComputeCanDeoptimize() const
const Slot & slot() const
bool ShouldEmitStoreBarrier() const
virtual bool HasUnknownSideEffects() const
intptr_t class_id() const
virtual intptr_t DeoptimizationTarget() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
intptr_t index_scale() const
virtual bool ComputeCanDeoptimize() const
void set_emit_store_barrier(StoreBarrierType value)
virtual bool MayHaveVisibleEffect() const
virtual bool AttributesEqual(const Instruction &other) const
virtual bool HasUnknownSideEffects() const
virtual bool MayHaveVisibleEffect() const
StoreIndexedUnsafeInstr(Value *index, Value *value, intptr_t offset)
Register base_reg() const
virtual bool ComputeCanDeoptimize() const
virtual TokenPosition token_pos() const
StoreLocalInstr(const LocalVariable &local, Value *value, const InstructionSource &source)
virtual bool HasUnknownSideEffects() const
const LocalVariable & local() const
virtual bool ComputeCanDeoptimize() const
StoreStaticFieldInstr(const Field &field, Value *value, const InstructionSource &source)
virtual bool HasUnknownSideEffects() const
virtual TokenPosition token_pos() const
virtual bool MayHaveVisibleEffect() const
virtual bool ComputeCanDeoptimize() const
virtual bool ComputeCanDeoptimize() const
PRINT_OPERANDS_TO_SUPPORT
bool needs_number_check() const
DISALLOW_COPY_AND_ASSIGN(StrictCompareInstr)
void set_needs_number_check(bool value)
StringToCharCodeInstr(Value *str, intptr_t cid)
virtual bool AttributesEqual(const Instruction &other) const
virtual bool ComputeCanDeoptimize() const
virtual intptr_t InputCount() const
virtual TokenPosition token_pos() const
SuspendInstr(const InstructionSource &source, StubId stub_id, Value *operand, Value *type_args, intptr_t deopt_id, intptr_t resume_deopt_id)
virtual bool HasUnknownSideEffects() const
bool has_type_args() const
intptr_t resume_deopt_id() const
virtual intptr_t NumberOfInputsConsumedBeforeCall() const
Value * type_args() const
virtual bool ComputeCanDeoptimizeAfterCall() const
virtual bool CanCallDart() const
DECLARE_INSTRUCTION(Suspend)
virtual bool ComputeCanDeoptimize() const
virtual bool AttributesEqual(const Instruction &other) const
TailCallInstr(const Code &code, Value *arg_desc)
virtual bool ComputeCanDeoptimize() const
virtual bool HasUnknownSideEffects() const
void adjust_edge_weight(double scale_factor)
DISALLOW_COPY_AND_ASSIGN(TargetEntryInstr)
virtual DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(TargetEntryInstr, BlockEntryInstr, FIELD_LIST) private void ClearPredecessors()
virtual BlockEntryInstr * PredecessorAt(intptr_t index) const
virtual intptr_t PredecessorCount() const
TargetEntryInstr(intptr_t block_id, intptr_t try_index, intptr_t deopt_id, intptr_t stack_depth=0)
void set_edge_weight(double weight)
virtual void AddPredecessor(BlockEntryInstr *predecessor)
virtual intptr_t InputCount() const
virtual Value * InputAt(intptr_t i) const
virtual bool MayHaveVisibleEffect() const
virtual void RawSetInputAt(intptr_t i, Value *value)
EmbeddedArray< Value *, N > inputs_
TemplateAllocation(const InstructionSource &source, intptr_t deopt_id)
virtual void RawSetInputAt(intptr_t i, Value *value)
virtual intptr_t InputCount() const
virtual Value * InputAt(intptr_t i) const
TemplateArrayAllocation(const InstructionSource &source, intptr_t deopt_id)
EmbeddedArray< Value *, N > inputs_
virtual intptr_t InputCount() const
virtual Value * InputAt(intptr_t i) const
virtual void RawSetInputAt(intptr_t i, Value *value)
EmbeddedArray< Value *, N > inputs_
TemplateComparison(const InstructionSource &source, Token::Kind kind, intptr_t deopt_id=DeoptId::kNone)
virtual bool MayThrow() const
typename CSETrait< ComparisonInstr, PureComparison >::Base BaseClass
virtual MoveArgumentsArray * GetMoveArguments() const
virtual bool MayThrow() const
intptr_t type_args_len() const
const Array & argument_names() const
intptr_t ArgumentCount() const
intptr_t FirstArgIndex() const
virtual bool CanCallDart() const
virtual bool ComputeCanDeoptimizeAfterCall() const
TemplateDartCall(intptr_t deopt_id, intptr_t type_args_len, const Array &argument_names, InputsArray &&inputs, const InstructionSource &source)
virtual void SetMoveArguments(MoveArgumentsArray *move_arguments)
intptr_t ArgumentCountWithoutTypeArgs() const
virtual intptr_t ArgumentsSize() const
virtual intptr_t NumberOfInputsConsumedBeforeCall() const
intptr_t ArgumentsSizeWithoutTypeArgs() const
ArrayPtr GetArgumentsDescriptor() const
virtual bool ComputeCanDeoptimize() const
virtual void ReplaceInputsWithMoveArguments(MoveArgumentsArray *move_arguments)
virtual TokenPosition token_pos() const
TemplateDefinition(intptr_t deopt_id=DeoptId::kNone)
EmbeddedArray< Value *, N > inputs_
typename CSETrait< Definition, PureDefinition >::Base BaseClass
virtual intptr_t InputCount() const
virtual bool MayThrow() const
virtual Value * InputAt(intptr_t i) const
TemplateDefinition(const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
virtual void RawSetInputAt(intptr_t i, Value *value)
TemplateInstruction(intptr_t deopt_id=DeoptId::kNone)
TemplateInstruction(const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
virtual void RawSetInputAt(intptr_t i, Value *value)
EmbeddedArray< Value *, N > inputs_
typename CSETrait< Instruction, PureInstruction >::Base BaseClass
virtual intptr_t InputCount() const
virtual Value * InputAt(intptr_t i) const
virtual bool MayThrow() const
virtual bool ComputeCanDeoptimize() const
virtual bool CanTriggerGC() const
virtual bool CanCallDart() const
virtual intptr_t NumberOfInputsConsumedBeforeCall() const
void set_calls_initializer(bool value)
bool calls_initializer() const
bool throw_exception_on_initialization() const
virtual bool HasUnknownSideEffects() const
virtual bool ComputeCanDeoptimizeAfterCall() const
virtual bool UseSharedSlowPathStub(bool is_optimizing) const
TemplateLoadField(const InstructionSource &source, bool calls_initializer=false, intptr_t deopt_id=DeoptId::kNone, const Field *field=nullptr)
virtual TokenPosition token_pos() const
virtual intptr_t DeoptimizationTarget() const
virtual bool MayThrow() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual bool ComputeCanDeoptimize() const
DECLARE_COMPARISON_INSTRUCTION(TestCids)
const ZoneGrowableArray< intptr_t > & cid_results() const
TestIntInstr(const InstructionSource &source, Token::Kind kind, Representation representation, Value *left, Value *right)
virtual bool ComputeCanDeoptimize() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
static bool IsSupported(Representation representation)
DECLARE_COMPARISON_INSTRUCTION(TestInt)
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(TestIntInstr, TemplateComparison, FIELD_LIST) private DISALLOW_COPY_AND_ASSIGN(TestIntInstr)
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual bool ComputeCanDeoptimize() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
DECLARE_COMPARISON_INSTRUCTION(TestRange)
void set_hierarchy_info(HierarchyInfo *value)
static Thread * Current()
ThrowInstr(const InstructionSource &source, intptr_t deopt_id, Value *exception)
virtual bool ComputeCanDeoptimize() const
virtual bool ComputeCanDeoptimizeAfterCall() const
virtual bool HasUnknownSideEffects() const
Value * exception() const
static bool IsTypeTestOperator(Kind tok)
static bool IsTypeCastOperator(Kind tok)
static bool IsIndexOperator(Kind tok)
static bool IsRelationalOperator(Kind tok)
static Token::Kind NegateComparison(Token::Kind op)
static bool IsBinaryOperator(Token::Kind token)
static bool IsEqualityOperator(Kind tok)
static bool IsUnaryOperator(Token::Kind token)
virtual bool ComputeCanDeoptimize() const
virtual Representation representation() const
virtual intptr_t DeoptimizationTarget() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
virtual bool AttributesEqual(const Instruction &other) const
virtual Representation representation() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual intptr_t DeoptimizationTarget() const
UnaryDoubleOpInstr(Token::Kind op_kind, Value *value, intptr_t deopt_id, SpeculativeMode speculative_mode=kGuardInputs, Representation representation=kUnboxedDouble)
Token::Kind op_kind() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
virtual bool ComputeCanDeoptimize() const
virtual Representation representation() const
virtual bool AttributesEqual(const Instruction &other) const
UnaryInt64OpInstr(Token::Kind op_kind, Value *value, intptr_t deopt_id, SpeculativeMode speculative_mode=kGuardInputs)
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual intptr_t DeoptimizationTarget() const
UnaryIntegerOpInstr(Token::Kind op_kind, Value *value, intptr_t deopt_id)
virtual bool AttributesEqual(const Instruction &other) const
Token::Kind op_kind() const
virtual bool ComputeCanDeoptimize() const
UnarySmiOpInstr(Token::Kind op_kind, Value *value, intptr_t deopt_id)
virtual bool ComputeCanDeoptimize() const
UnaryUint32OpInstr(Token::Kind op_kind, Value *value, intptr_t deopt_id)
virtual Representation RequiredInputRepresentation(intptr_t idx) const
virtual Representation representation() const
static bool IsSupported(Token::Kind op_kind)
virtual TokenPosition token_pos() const
virtual Representation representation() const
void set_speculative_mode(SpeculativeMode value)
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(UnboxInstr, TemplateDefinition, FIELD_LIST) protected
virtual intptr_t DeoptimizationTarget() const
virtual bool AttributesEqual(const Instruction &other) const
virtual bool ComputeCanDeoptimize() const
UnboxInt32Instr(TruncationMode truncation_mode, Value *value, intptr_t deopt_id, SpeculativeMode speculative_mode=kGuardInputs)
UnboxInt64Instr(Value *value, intptr_t deopt_id, SpeculativeMode speculative_mode)
UnboxInteger32Instr(Representation representation, TruncationMode truncation_mode, Value *value, intptr_t deopt_id, SpeculativeMode speculative_mode)
virtual bool AttributesEqual(const Instruction &other) const
UnboxIntegerInstr(Representation representation, TruncationMode truncation_mode, Value *value, intptr_t deopt_id, SpeculativeMode speculative_mode)
bool is_truncating() const
virtual bool AttributesEqual(const Instruction &other) const
UnboxLaneInstr(Value *value, intptr_t n, Representation definition_rep, intptr_t definition_cid)
virtual bool ComputeCanDeoptimize() const
virtual Representation representation() const
virtual Representation RequiredInputRepresentation(intptr_t idx) const
UnboxUint32Instr(Value *value, intptr_t deopt_id, SpeculativeMode speculative_mode=kGuardInputs)
uword constant_address() const
virtual Representation representation() const
virtual bool AttributesEqual(const Instruction &other) const
virtual bool HasUnknownSideEffects() const
virtual bool ComputeCanDeoptimize() const
virtual intptr_t DeoptimizationTarget() const
Utf8ScanInstr(Value *decoder, Value *bytes, Value *start, Value *end, Value *table, const Slot &decoder_scan_flags_field)
virtual Representation representation() const
virtual SpeculativeMode SpeculativeModeOfInput(intptr_t index) const
static constexpr T NBitMask(size_t n)
static constexpr bool IsPowerOfTwo(T x)
ValueListIterable(Value *value)
void BindToEnvironment(Definition *definition)
void set_use_index(intptr_t index)
bool BindsToConstantNull() const
bool BindsToConstant() const
void set_previous_use(Value *previous)
intptr_t use_index() const
bool CanBe(const Object &value)
static void AddToList(Value *value, Value **list)
void SetReachingType(CompileType *type)
bool Equals(const Value &other) const
intptr_t BoundSmiConstant() const
bool BindsToSmiConstant() const
Instruction * instruction() const
void set_next_use(Value *next)
Value * previous_use() const
const Object & BoundConstant() const
void set_definition(Definition *definition)
Value * CopyWithType(Zone *zone)
CompileType * reaching_type() const
Definition * definition() const
void BindTo(Definition *definition)
Value(Definition *definition)
const char * ToCString() const
void RefineReachingType(CompileType *type)
void set_instruction(Instruction *instruction)
VariadicDefinition(InputsArray &&inputs, intptr_t deopt_id=DeoptId::kNone)
VariadicDefinition(const intptr_t num_inputs, intptr_t deopt_id=DeoptId::kNone)
intptr_t InputCount() const
Value * InputAt(intptr_t i) const
VariadicDefinition(InputsArray &&inputs, const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
intptr_t NumArgumentDefinitions() const
bool ReturnsCompound() const
static word InstanceSize()
static word ElementSizeFor(intptr_t cid)
static word field_offset(intptr_t index)
static word InstanceSize()
@ kNormal
Default priority level.
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
void PrintTo(FlValue *v, std::ostream *os)
Dart_NativeFunction function
static float max(float r, float g, float b)
static float min(float r, float g, float b)
#define VALUE_DEFN(name, val)
#define DECLARE_INSTRUCTION_BACKEND()
#define DECLARE_COMPARISON_INSTRUCTION(type)
#define DECLARE_VISIT_INSTRUCTION(ShortName, Attrs)
#define DECLARE_EMPTY_SERIALIZATION(Instr, BaseClass)
#define DECLARE_TAG(type, attrs)
#define FOR_EACH_INSTRUCTION(M)
#define DECLARE_ATTRIBUTE(Attribute)
#define DECLARE_ABSTRACT_INSTRUCTION(type)
#define DECLARE_ATTRIBUTES_NAMED(names, values)
#define DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(Instr, BaseClass, FieldList)
#define VALUE_CASE(name, val)
#define PRINT_OPERANDS_TO_SUPPORT
#define INSTRUCTION_TYPE_CHECK(Name, Attrs)
#define DECLARE_INSTRUCTION_NO_BACKEND(type)
#define FOR_EACH_ALIAS_IDENTITY_VALUE(V)
#define DECLARE_INSTRUCTION(type)
#define PRINT_BLOCK_HEADER_TO_SUPPORT
#define DECLARE_ENUM(Arity, Mask, Name,...)
#define FORWARD_DECLARATION(type, attrs)
#define DECLARE_CUSTOM_SERIALIZATION(Instr)
#define SIMD_OP_LIST(M, BINARY_OP)
#define DECLARE_EXTRA_SERIALIZATION
#define FOR_EACH_ABSTRACT_INSTRUCTION(M)
const GrXPFactory * Get(SkBlendMode mode)
bool IsSupported(const SkMaskFilter *maskfilter)
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
bool Contains(const Container &container, const Value &value)
static dart::SimpleHashMap * environment
const intptr_t kResultIndex
bool WillAllocateNewOrRememberedContext(intptr_t num_context_variables)
bool WillAllocateNewOrRememberedArray(intptr_t length)
double DoubleValue(const dart::Object &a)
static constexpr intptr_t kWordSize
bool IsDouble(const dart::Object &a)
constexpr intptr_t kSmiBits
word SmiValue(const dart::Object &a)
static AbstractTypePtr InstantiateType(const AbstractType &type, const AbstractType &instantiator)
IntegerPtr DoubleToInteger(Zone *zone, double val)
static void Evaluate(Thread *thread, JSONStream *js)
bool IsTypedDataBaseClassId(intptr_t index)
static constexpr const char * kNone
constexpr intptr_t kBitsPerWord
static constexpr Representation kUnboxedUword
DART_EXPORT bool IsNull(Dart_Handle object)
static constexpr intptr_t kMaxLocationCount
constexpr intptr_t kBitsPerByte
GrowableArray< Value * > InputsArray
intptr_t LocationCount(Representation rep)
MallocGrowableArray< CidRangeValue > CidRangeVector
bool IsClampedTypedDataBaseClassId(intptr_t index)
bool IsAllocatableInNewSpace(intptr_t size)
ZoneGrowableArray< MoveArgumentInstr * > MoveArgumentsArray
static constexpr Representation kUnboxedAddress
static InstancePtr AllocateObject(Thread *thread, const Class &cls)
static constexpr Representation kUnboxedIntPtr
typename unwrap_enum< std::remove_cv_t< T >, std::is_enum< T >::value >::type serializable_type_t
const char *const function_name
static constexpr Representation kUnboxedWord
void(* NativeFunction)(NativeArguments *arguments)
static constexpr intptr_t kInvalidTryIndex
COMPILE_ASSERT(kUnreachableReference==WeakTable::kNoValue)
bool IsStringClassId(intptr_t index)
Dest BitCast(const Source &source)
void DartReturn(T result, Dart_NativeArguments args)
static DecodeResult decode(std::string path)
int compare(const void *untyped_lhs, const void *untyped_rhs)
static SkString join(const CommandLineFlags::StringArray &)
const intptr_t count_with_type_args
const intptr_t count_without_type_args
const intptr_t type_args_len
ArgumentsInfo(intptr_t type_args_len, intptr_t count_with_type_args, intptr_t size_with_type_args, const Array &argument_names)
const intptr_t size_with_type_args
const intptr_t size_without_type_args
const Array & argument_names
ArrayPtr ToArgumentsDescriptor() const
static constexpr Representation NativeRepresentation(Representation rep)
static intptr_t BoxCid(Representation rep)
static intptr_t ValueOffset(Representation rep)
compiler::Label * fall_through
compiler::Label * false_label
compiler::Label * true_label
CidRangeValue(intptr_t cid_start_arg, intptr_t cid_end_arg)
bool Contains(intptr_t cid) const
bool Equals(const CidRangeValue &other) const
CidRangeValue(const CidRange &other)
bool IsIllegalRange() const
CidRange(intptr_t cid_start_arg, intptr_t cid_end_arg)
bool IsIllegalRange() const
DISALLOW_COPY_AND_ASSIGN(CidRange)
bool Contains(intptr_t cid) const
bool operator==(const Iterator &other)
bool operator!=(const Iterator &other)
const Instruction * instr
static BlockEntryInstr * At(const Instruction *instr, intptr_t index)
static intptr_t Length(const Instruction *instr)
static constexpr bool kCanThrow
static constexpr size_t ValueSize(Representation rep)
static constexpr bool IsUnboxedInteger(Representation rep)
static constexpr bool IsUnboxed(Representation rep)
StaticTypeExactnessState exactness
DISALLOW_COPY_AND_ASSIGN(TargetInfo)
TargetInfo(intptr_t cid_start_arg, intptr_t cid_end_arg, const Function *target_arg, intptr_t count_arg, StaticTypeExactnessState exactness)
static constexpr bool kCanThrow
bool operator==(const Iterator &other)
Value * operator*() const
bool operator!=(const Iterator &other)
std::underlying_type_t< T > type