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

#include <il.h>

Inheritance diagram for dart::IndirectGotoInstr:
dart::TemplateInstruction< 1, NoThrow > dart::Instruction dart::ZoneAllocated

Public Member Functions

 IndirectGotoInstr (intptr_t target_count, Value *target_index)
 
virtual Representation RequiredInputRepresentation (intptr_t idx) const
 
void AddSuccessor (TargetEntryInstr *successor)
 
virtual intptr_t SuccessorCount () const
 
virtual TargetEntryInstrSuccessorAt (intptr_t index) const
 
virtual bool ComputeCanDeoptimize () const
 
virtual bool CanBecomeDeoptimizationTarget () const
 
virtual bool HasUnknownSideEffects () const
 
Valueoffset () const
 
void ComputeOffsetTable (FlowGraphCompiler *compiler)
 
- Public Member Functions inherited from dart::TemplateInstruction< 1, NoThrow >
 TemplateInstruction (intptr_t deopt_id=DeoptId::kNone)
 
 TemplateInstruction (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

- Public Types inherited from dart::TemplateInstruction< 1, NoThrow >
using BaseClass = typename NoCSE< Instruction, PureInstruction >::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 >
 
- 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::TemplateInstruction< 1, NoThrow >
EmbeddedArray< Value *, Ninputs_
 

Detailed Description

Definition at line 3796 of file il.h.

Constructor & Destructor Documentation

◆ IndirectGotoInstr()

dart::IndirectGotoInstr::IndirectGotoInstr ( intptr_t  target_count,
Value target_index 
)
inline

Definition at line 3798 of file il.h.

3799 : offsets_(TypedData::ZoneHandle(TypedData::New(kTypedDataInt32ArrayCid,
3800 target_count,
3801 Heap::kOld))) {
3802 SetInputAt(0, target_index);
3803 }
@ kOld
Definition: heap.h:39
void SetInputAt(intptr_t i, Value *value)
Definition: il.h:1014
static Object & ZoneHandle()
Definition: object.h:419
static TypedDataPtr New(intptr_t class_id, intptr_t len, Heap::Space space=Heap::kNew)
Definition: object.cc:25587

Member Function Documentation

◆ AddSuccessor()

void dart::IndirectGotoInstr::AddSuccessor ( TargetEntryInstr successor)
inline

Definition at line 3812 of file il.h.

3812 {
3813 ASSERT(successor->next()->IsGoto());
3814 ASSERT(successor->next()->AsGoto()->successor()->IsIndirectEntry());
3815 successors_.Add(successor);
3816 }
#define ASSERT(E)

◆ CanBecomeDeoptimizationTarget()

virtual bool dart::IndirectGotoInstr::CanBecomeDeoptimizationTarget ( ) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 3825 of file il.h.

3825{ return false; }

◆ ComputeCanDeoptimize()

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

Implements dart::Instruction.

Definition at line 3824 of file il.h.

3824{ return false; }

◆ ComputeOffsetTable()

void dart::IndirectGotoInstr::ComputeOffsetTable ( FlowGraphCompiler compiler)

Definition at line 4496 of file il.cc.

4496 {
4497 ASSERT(SuccessorCount() == offsets_.Length());
4498 intptr_t element_size = offsets_.ElementSizeInBytes();
4499 for (intptr_t i = 0; i < SuccessorCount(); i++) {
4500 TargetEntryInstr* target = SuccessorAt(i);
4501 auto* label = compiler->GetJumpLabel(target);
4502 RELEASE_ASSERT(label != nullptr);
4503 RELEASE_ASSERT(label->IsBound());
4504 intptr_t offset = label->Position();
4506 offsets_.SetInt32(i * element_size, offset);
4507 }
4508}
static size_t element_size(Layout layout, SkSLType type)
#define RELEASE_ASSERT(cond)
Definition: assert.h:327
virtual intptr_t SuccessorCount() const
Definition: il.h:3818
virtual TargetEntryInstr * SuccessorAt(intptr_t index) const
Definition: il.h:3819
Value * offset() const
Definition: il.h:3829
intptr_t Length() const
Definition: object.h:11518
intptr_t ElementSizeInBytes() const
Definition: object.h:11531
uint32_t * target

◆ HasUnknownSideEffects()

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

Implements dart::Instruction.

Definition at line 3827 of file il.h.

3827{ return false; }

◆ offset()

Value * dart::IndirectGotoInstr::offset ( ) const
inline

Definition at line 3829 of file il.h.

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

◆ RequiredInputRepresentation()

virtual Representation dart::IndirectGotoInstr::RequiredInputRepresentation ( intptr_t  idx) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 3807 of file il.h.

3807 {
3808 ASSERT(idx == 0);
3809 return kTagged;
3810 }

◆ SuccessorAt()

virtual TargetEntryInstr * dart::IndirectGotoInstr::SuccessorAt ( intptr_t  index) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 3819 of file il.h.

3819 {
3820 ASSERT(index < SuccessorCount());
3821 return successors_[index];
3822 }

◆ SuccessorCount()

virtual intptr_t dart::IndirectGotoInstr::SuccessorCount ( ) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 3818 of file il.h.

3818{ return successors_.length(); }

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