Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | List of all members
dart::SuspendInstr Class Reference

#include <il.h>

Inheritance diagram for dart::SuspendInstr:
dart::TemplateDefinition< 2, Throws > dart::Instruction dart::ZoneAllocated

Public Types

enum class  StubId {
  kAwait , kAwaitWithTypeCheck , kYieldAsyncStar , kSuspendSyncStarAtStart ,
  kSuspendSyncStarAtYield
}
 
- Public Types inherited from dart::TemplateDefinition< 2, Throws >
using BaseClass = typename NoCSE< Definition, PureDefinition >::Base
 
- Public Types inherited from dart::Instruction
enum  Tag { FOR_EACH_INSTRUCTION =(DECLARE_TAG) kNumInstructions }
 
enum  SpeculativeMode { kGuardInputs , kNotSpeculative }
 
using InputsIterable = InstructionIndexedPropertyIterable< InputsTrait >
 
using SuccessorsIterable = InstructionIndexedPropertyIterable< SuccessorsTrait >
 

Public Member Functions

 SuspendInstr (const InstructionSource &source, StubId stub_id, Value *operand, Value *type_args, intptr_t deopt_id, intptr_t resume_deopt_id)
 
bool has_type_args () const
 
virtual intptr_t InputCount () const
 
Valueoperand () const
 
Valuetype_args () const
 
StubId stub_id () const
 
intptr_t resume_deopt_id () const
 
virtual TokenPosition token_pos () const
 
virtual bool CanCallDart () const
 
virtual bool ComputeCanDeoptimize () const
 
virtual bool ComputeCanDeoptimizeAfterCall () const
 
virtual bool HasUnknownSideEffects () const
 
virtual intptr_t NumberOfInputsConsumedBeforeCall () const
 
 DECLARE_INSTRUCTION (Suspend)
 
virtual PRINT_OPERANDS_TO_SUPPORT DefinitionCanonicalize (FlowGraph *flow_graph)
 
- Public Member Functions inherited from dart::TemplateDefinition< 2, Throws >
 TemplateDefinition (intptr_t deopt_id=DeoptId::kNone)
 
 TemplateDefinition (const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
 
virtual intptr_t InputCount () const
 
virtual ValueInputAt (intptr_t i) const
 
virtual bool MayThrow () const
 
- Public Member Functions inherited from dart::Instruction
 Instruction (const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
 
 Instruction (intptr_t deopt_id=DeoptId::kNone)
 
virtual ~Instruction ()
 
virtual Tag tag () const =0
 
virtual intptr_t statistics_tag () const
 
intptr_t deopt_id () const
 
virtual TokenPosition token_pos () const
 
InstructionSource source () const
 
virtual intptr_t InputCount () const =0
 
virtual ValueInputAt (intptr_t i) const =0
 
void SetInputAt (intptr_t i, Value *value)
 
InputsIterable inputs ()
 
void UnuseAllInputs ()
 
virtual intptr_t ArgumentCount () const
 
ValueArgumentValueAt (intptr_t index) const
 
DefinitionArgumentAt (intptr_t index) const
 
virtual void SetMoveArguments (MoveArgumentsArray *move_arguments)
 
virtual MoveArgumentsArrayGetMoveArguments () const
 
virtual void ReplaceInputsWithMoveArguments (MoveArgumentsArray *move_arguments)
 
bool HasMoveArguments () const
 
void RepairArgumentUsesInEnvironment () const
 
virtual bool ComputeCanDeoptimize () const =0
 
virtual bool ComputeCanDeoptimizeAfterCall () const
 
bool CanDeoptimize () const
 
virtual void Accept (InstructionVisitor *visitor)=0
 
Instructionprevious () const
 
void set_previous (Instruction *instr)
 
Instructionnext () const
 
void set_next (Instruction *instr)
 
void LinkTo (Instruction *next)
 
InstructionRemoveFromGraph (bool return_previous=true)
 
virtual intptr_t SuccessorCount () const
 
virtual BlockEntryInstrSuccessorAt (intptr_t index) const
 
SuccessorsIterable successors () const
 
void Goto (JoinEntryInstr *entry)
 
virtual const char * DebugName () const =0
 
void CheckField (const Field &field) const
 
const char * ToCString () const
 
 DECLARE_INSTRUCTION_TYPE_CHECK (BlockEntryWithInitialDefs, BlockEntryWithInitialDefs) template< typename T > T *Cast()
 
template<typename T >
const TCast () const
 
LocationSummarylocs ()
 
bool HasLocs () const
 
virtual LocationSummaryMakeLocationSummary (Zone *zone, bool is_optimizing) const =0
 
void InitializeLocationSummary (Zone *zone, bool optimizing)
 
virtual void EmitNativeCode (FlowGraphCompiler *compiler)
 
Environmentenv () const
 
void SetEnvironment (Environment *deopt_env)
 
void RemoveEnvironment ()
 
void ReplaceInEnvironment (Definition *current, Definition *replacement)
 
virtual intptr_t NumberOfInputsConsumedBeforeCall () const
 
intptr_t GetPassSpecificId (CompilerPass::Id pass) const
 
void SetPassSpecificId (CompilerPass::Id pass, intptr_t id)
 
bool HasPassSpecificId (CompilerPass::Id pass) const
 
bool HasUnmatchedInputRepresentations () const
 
virtual Representation RequiredInputRepresentation (intptr_t idx) const
 
SpeculativeMode SpeculativeModeOfInputs () const
 
virtual SpeculativeMode SpeculativeModeOfInput (intptr_t index) const
 
virtual Representation representation () const
 
bool WasEliminated () const
 
virtual intptr_t DeoptimizationTarget () const
 
virtual InstructionCanonicalize (FlowGraph *flow_graph)
 
void InsertBefore (Instruction *next)
 
void InsertAfter (Instruction *prev)
 
InstructionAppendInstruction (Instruction *tail)
 
virtual bool AllowsCSE () const
 
virtual bool HasUnknownSideEffects () const =0
 
virtual bool CanCallDart () const
 
virtual bool CanTriggerGC () const
 
virtual BlockEntryInstrGetBlock ()
 
virtual intptr_t inlining_id () const
 
virtual void set_inlining_id (intptr_t value)
 
virtual bool has_inlining_id () const
 
virtual uword Hash () const
 
bool Equals (const Instruction &other) const
 
virtual bool AttributesEqual (const Instruction &other) const
 
void InheritDeoptTarget (Zone *zone, Instruction *other)
 
bool NeedsEnvironment () const
 
virtual bool CanBecomeDeoptimizationTarget () const
 
void InheritDeoptTargetAfter (FlowGraph *flow_graph, Definition *call, Definition *result)
 
virtual bool MayThrow () const =0
 
virtual bool MayHaveVisibleEffect () const
 
virtual bool CanEliminate (const BlockEntryInstr *block) const
 
bool CanEliminate ()
 
bool IsDominatedBy (Instruction *dom)
 
void ClearEnv ()
 
void Unsupported (FlowGraphCompiler *compiler)
 
virtual bool UseSharedSlowPathStub (bool is_optimizing) const
 
Location::Kind RegisterKindForResult () const
 
- Public Member Functions inherited from dart::ZoneAllocated
 ZoneAllocated ()
 
void * operator new (size_t size)
 
void * operator new (size_t size, Zone *zone)
 
void operator delete (void *pointer)
 

Additional Inherited Members

- Static Public Member Functions inherited from dart::Instruction
static const ICDataGetICData (const ZoneGrowableArray< const ICData * > &ic_data_array, intptr_t deopt_id, bool is_static_call)
 
static LocationSummaryMakeCallSummary (Zone *zone, const Instruction *instr, LocationSummary *locs=nullptr)
 
static bool SlowPathSharingSupported (bool is_optimizing)
 
- Static Public Attributes inherited from dart::Instruction
static const intptr_t kInstructionAttrs [kNumInstructions]
 
- Protected Member Functions inherited from dart::Instruction
intptr_t GetDeoptId () const
 
virtual void CopyDeoptIdFrom (const Instruction &instr)
 
void WriteExtraWithoutInputs (FlowGraphSerializer *s)
 
void ReadExtraWithoutInputs (FlowGraphDeserializer *d)
 
- Protected Attributes inherited from dart::TemplateDefinition< 2, Throws >
EmbeddedArray< Value *, Ninputs_
 

Detailed Description

Definition at line 11477 of file il.h.

Member Enumeration Documentation

◆ StubId

enum class dart::SuspendInstr::StubId
strong
Enumerator
kAwait 
kAwaitWithTypeCheck 
kYieldAsyncStar 
kSuspendSyncStarAtStart 
kSuspendSyncStarAtYield 

Definition at line 11479 of file il.h.

11479 {
11480 kAwait,
11481 kAwaitWithTypeCheck,
11482 kYieldAsyncStar,
11483 kSuspendSyncStarAtStart,
11484 kSuspendSyncStarAtYield,
11485 };

Constructor & Destructor Documentation

◆ SuspendInstr()

dart::SuspendInstr::SuspendInstr ( const InstructionSource source,
StubId  stub_id,
Value operand,
Value type_args,
intptr_t  deopt_id,
intptr_t  resume_deopt_id 
)
inline

Definition at line 11487 of file il.h.

11494 stub_id_(stub_id),
11495 resume_deopt_id_(resume_deopt_id),
11496 token_pos_(source.token_pos) {
11497 SetInputAt(0, operand);
11498 if (has_type_args()) {
11500 } else {
11501 ASSERT(type_args == nullptr);
11502 }
11503 }
void SetInputAt(intptr_t i, Value *value)
Definition: il.h:1014
InstructionSource source() const
Definition: il.h:1008
intptr_t deopt_id() const
Definition: il.h:993
bool has_type_args() const
Definition: il.h:11505
intptr_t resume_deopt_id() const
Definition: il.h:11515
StubId stub_id() const
Definition: il.h:11514
Value * type_args() const
Definition: il.h:11509
Value * operand() const
Definition: il.h:11508
TemplateDefinition(intptr_t deopt_id=DeoptId::kNone)
Definition: il.h:2749
#define ASSERT(E)
const TokenPosition token_pos

Member Function Documentation

◆ CanCallDart()

virtual bool dart::SuspendInstr::CanCallDart ( ) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 11518 of file il.h.

11518{ return true; }

◆ Canonicalize()

Definition * dart::SuspendInstr::Canonicalize ( FlowGraph flow_graph)
virtual

Reimplemented from dart::Instruction.

Definition at line 8562 of file il.cc.

8562 {
8564 !operand()->Type()->CanBeFuture()) {
8566 stub_id_ = StubId::kAwait;
8567 }
8568 return this;
8569}
Type
Definition: SortBench.cpp:56
void RemoveFromUseList()
Definition: il.cc:1457

◆ ComputeCanDeoptimize()

virtual bool dart::SuspendInstr::ComputeCanDeoptimize ( ) const
inlinevirtual

Implements dart::Instruction.

Definition at line 11519 of file il.h.

11519{ return false; }

◆ ComputeCanDeoptimizeAfterCall()

virtual bool dart::SuspendInstr::ComputeCanDeoptimizeAfterCall ( ) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 11520 of file il.h.

11520{ return true; }

◆ DECLARE_INSTRUCTION()

dart::SuspendInstr::DECLARE_INSTRUCTION ( Suspend  )

◆ has_type_args()

bool dart::SuspendInstr::has_type_args ( ) const
inline

Definition at line 11505 of file il.h.

11505{ return stub_id_ == StubId::kAwaitWithTypeCheck; }

◆ HasUnknownSideEffects()

virtual bool dart::SuspendInstr::HasUnknownSideEffects ( ) const
inlinevirtual

Implements dart::Instruction.

Definition at line 11521 of file il.h.

11521{ return true; }

◆ InputCount()

virtual intptr_t dart::SuspendInstr::InputCount ( ) const
inlinevirtual

Reimplemented from dart::TemplateDefinition< 2, Throws >.

Definition at line 11506 of file il.h.

11506{ return has_type_args() ? 2 : 1; }

◆ NumberOfInputsConsumedBeforeCall()

virtual intptr_t dart::SuspendInstr::NumberOfInputsConsumedBeforeCall ( ) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 11522 of file il.h.

11522 {
11523 return InputCount();
11524 }
virtual intptr_t InputCount() const
Definition: il.h:11506

◆ operand()

Value * dart::SuspendInstr::operand ( ) const
inline

Definition at line 11508 of file il.h.

11508{ return inputs_[0]; }
EmbeddedArray< Value *, N > inputs_
Definition: il.h:2762

◆ resume_deopt_id()

intptr_t dart::SuspendInstr::resume_deopt_id ( ) const
inline

Definition at line 11515 of file il.h.

11515{ return resume_deopt_id_; }

◆ stub_id()

StubId dart::SuspendInstr::stub_id ( ) const
inline

Definition at line 11514 of file il.h.

11514{ return stub_id_; }

◆ token_pos()

virtual TokenPosition dart::SuspendInstr::token_pos ( ) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 11516 of file il.h.

11516{ return token_pos_; }

◆ type_args()

Value * dart::SuspendInstr::type_args ( ) const
inline

Definition at line 11509 of file il.h.

11509 {
11511 return inputs_[1];
11512 }

The documentation for this class was generated from the following files: