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

#include <il.h>

Inheritance diagram for dart::CheckStackOverflowInstr:
dart::TemplateInstruction< 0, NoThrow > dart::Instruction dart::ZoneAllocated

Public Types

enum  Kind { kOsrAndPreemption , kOsrOnly }
 
- Public Types inherited from dart::TemplateInstruction< 0, 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 >
 

Public Member Functions

 CheckStackOverflowInstr (const InstructionSource &source, intptr_t stack_depth, intptr_t loop_depth, intptr_t deopt_id, Kind kind)
 
virtual TokenPosition token_pos () const
 
bool in_loop () const
 
intptr_t stack_depth () const
 
intptr_t loop_depth () const
 
virtual bool ComputeCanDeoptimize () const
 
virtual bool ComputeCanDeoptimizeAfterCall () const
 
virtual InstructionCanonicalize (FlowGraph *flow_graph)
 
virtual bool HasUnknownSideEffects () const
 
virtual bool CanEliminate (const BlockEntryInstr *block) const
 
virtual bool UseSharedSlowPathStub (bool is_optimizing) const
 
- Public Member Functions inherited from dart::TemplateInstruction< 0, 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

- 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< 0, NoThrow >
EmbeddedArray< Value *, Ninputs_
 

Detailed Description

Definition at line 9877 of file il.h.

Member Enumeration Documentation

◆ Kind

Enumerator
kOsrAndPreemption 
kOsrOnly 

Definition at line 9879 of file il.h.

9879 {
9880 // kOsrAndPreemption stack overflow checks are emitted in both unoptimized
9881 // and optimized versions of the code and they serve as both preemption and
9882 // OSR entry points.
9884
9885 // kOsrOnly stack overflow checks are only needed in the unoptimized code
9886 // because we can't OSR optimized code.
9887 kOsrOnly,
9888 };

Constructor & Destructor Documentation

◆ CheckStackOverflowInstr()

dart::CheckStackOverflowInstr::CheckStackOverflowInstr ( const InstructionSource source,
intptr_t  stack_depth,
intptr_t  loop_depth,
intptr_t  deopt_id,
Kind  kind 
)
inline

Definition at line 9890 of file il.h.

9896 token_pos_(source.token_pos),
9897 stack_depth_(stack_depth),
9898 loop_depth_(loop_depth),
9899 kind_(kind) {
9900 ASSERT(kind != kOsrOnly || loop_depth > 0);
9901 }
intptr_t stack_depth() const
Definition: il.h:9905
intptr_t loop_depth() const
Definition: il.h:9906
InstructionSource source() const
Definition: il.h:1008
intptr_t deopt_id() const
Definition: il.h:993
TemplateInstruction(intptr_t deopt_id=DeoptId::kNone)
Definition: il.h:1507
#define ASSERT(E)
const TokenPosition token_pos

Member Function Documentation

◆ CanEliminate()

virtual bool dart::CheckStackOverflowInstr::CanEliminate ( const BlockEntryInstr block) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 9919 of file il.h.

9919 {
9920 return false;
9921 }

◆ Canonicalize()

Instruction * dart::CheckStackOverflowInstr::Canonicalize ( FlowGraph flow_graph)
virtual

Reimplemented from dart::Instruction.

Definition at line 2653 of file il.cc.

2653 {
2654 switch (kind_) {
2655 case kOsrAndPreemption:
2656 return this;
2657 case kOsrOnly:
2658 // Don't need OSR entries in the optimized code.
2659 return nullptr;
2660 }
2661
2662 // Switch above exhausts all possibilities but some compilers can't figure
2663 // it out.
2664 UNREACHABLE();
2665 return this;
2666}
#define UNREACHABLE()
Definition: assert.h:248

◆ ComputeCanDeoptimize()

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

Implements dart::Instruction.

Definition at line 9910 of file il.h.

9910{ return false; }

◆ ComputeCanDeoptimizeAfterCall()

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

Reimplemented from dart::Instruction.

Definition at line 9911 of file il.h.

9911 {
9912 return !CompilerState::Current().is_aot();
9913 }
bool is_aot() const
static CompilerState & Current()

◆ HasUnknownSideEffects()

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

Implements dart::Instruction.

Definition at line 9917 of file il.h.

9917{ return false; }

◆ in_loop()

bool dart::CheckStackOverflowInstr::in_loop ( ) const
inline

Definition at line 9904 of file il.h.

9904{ return loop_depth_ > 0; }

◆ loop_depth()

intptr_t dart::CheckStackOverflowInstr::loop_depth ( ) const
inline

Definition at line 9906 of file il.h.

9906{ return loop_depth_; }

◆ stack_depth()

intptr_t dart::CheckStackOverflowInstr::stack_depth ( ) const
inline

Definition at line 9905 of file il.h.

9905{ return stack_depth_; }

◆ token_pos()

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

Reimplemented from dart::Instruction.

Definition at line 9903 of file il.h.

9903{ return token_pos_; }

◆ UseSharedSlowPathStub()

virtual bool dart::CheckStackOverflowInstr::UseSharedSlowPathStub ( bool  is_optimizing) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 9923 of file il.h.

9923 {
9924 return SlowPathSharingSupported(is_optimizing);
9925 }
static bool SlowPathSharingSupported(bool is_optimizing)
Definition: il.h:1368

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