Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 >

Public Types

enum  Kind { kOsrAndPreemption , kOsrOnly }
 
- Public Types inherited from dart::TemplateInstruction< 0, NoThrow >
using BaseClass = typename NoCSE< Instruction, PureInstruction >::Base
 

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
 

Additional Inherited Members

- Protected Attributes inherited from dart::TemplateInstruction< 0, NoThrow >
EmbeddedArray< Value *, Ninputs_
 

Detailed Description

Definition at line 9829 of file il.h.

Member Enumeration Documentation

◆ Kind

Enumerator
kOsrAndPreemption 
kOsrOnly 

Definition at line 9831 of file il.h.

9831 {
9832 // kOsrAndPreemption stack overflow checks are emitted in both unoptimized
9833 // and optimized versions of the code and they serve as both preemption and
9834 // OSR entry points.
9836
9837 // kOsrOnly stack overflow checks are only needed in the unoptimized code
9838 // because we can't OSR optimized code.
9839 kOsrOnly,
9840 };

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 9842 of file il.h.

9847 : TemplateInstruction(source, deopt_id),
9848 token_pos_(source.token_pos),
9849 stack_depth_(stack_depth),
9850 loop_depth_(loop_depth),
9851 kind_(kind) {
9852 ASSERT(kind != kOsrOnly || loop_depth > 0);
9853 }
intptr_t stack_depth() const
Definition il.h:9857
intptr_t loop_depth() const
Definition il.h:9858
TemplateInstruction(intptr_t deopt_id=DeoptId::kNone)
Definition il.h:1501
#define ASSERT(E)
SkBitmap source
Definition examples.cpp:28

Member Function Documentation

◆ CanEliminate()

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

Definition at line 9871 of file il.h.

9871 {
9872 return false;
9873 }

◆ Canonicalize()

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

Definition at line 2644 of file il.cc.

2644 {
2645 switch (kind_) {
2646 case kOsrAndPreemption:
2647 return this;
2648 case kOsrOnly:
2649 // Don't need OSR entries in the optimized code.
2650 return nullptr;
2651 }
2652
2653 // Switch above exhausts all possibilities but some compilers can't figure
2654 // it out.
2655 UNREACHABLE();
2656 return this;
2657}
#define UNREACHABLE()
Definition assert.h:248

◆ ComputeCanDeoptimize()

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

Definition at line 9862 of file il.h.

9862{ return false; }

◆ ComputeCanDeoptimizeAfterCall()

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

Definition at line 9863 of file il.h.

9863 {
9864 return !CompilerState::Current().is_aot();
9865 }
static CompilerState & Current()

◆ HasUnknownSideEffects()

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

Definition at line 9869 of file il.h.

9869{ return false; }

◆ in_loop()

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

Definition at line 9856 of file il.h.

9856{ return loop_depth_ > 0; }

◆ loop_depth()

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

Definition at line 9858 of file il.h.

9858{ return loop_depth_; }

◆ stack_depth()

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

Definition at line 9857 of file il.h.

9857{ return stack_depth_; }

◆ token_pos()

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

Definition at line 9855 of file il.h.

9855{ return token_pos_; }

◆ UseSharedSlowPathStub()

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

Definition at line 9875 of file il.h.

9875 {
9876 return SlowPathSharingSupported(is_optimizing);
9877 }

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