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

#include <il.h>

Inheritance diagram for dart::CheckConditionInstr:
dart::Instruction dart::ZoneAllocated

Public Member Functions

 CheckConditionInstr (ComparisonInstr *comparison, intptr_t deopt_id)
 
ComparisonInstrcomparison () const
 
virtual bool ComputeCanDeoptimize () const
 
virtual InstructionCanonicalize (FlowGraph *flow_graph)
 
virtual bool AllowsCSE () const
 
virtual bool HasUnknownSideEffects () const
 
virtual bool AttributesEqual (const Instruction &other) const
 
virtual intptr_t InputCount () const
 
virtual ValueInputAt (intptr_t i) const
 
virtual bool MayThrow () const
 
virtual void CopyDeoptIdFrom (const Instruction &instr)
 
 DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS (CheckConditionInstr, Instruction, FIELD_LIST) DECLARE_EXTRA_SERIALIZATION private
 
 DISALLOW_COPY_AND_ASSIGN (CheckConditionInstr)
 
- 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::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)
 

Detailed Description

Definition at line 10963 of file il.h.

Constructor & Destructor Documentation

◆ CheckConditionInstr()

dart::CheckConditionInstr::CheckConditionInstr ( ComparisonInstr comparison,
intptr_t  deopt_id 
)
inline

Definition at line 10965 of file il.h.

10966 : Instruction(deopt_id), comparison_(comparison) {
10968 ASSERT(comparison->env() == nullptr);
10969 for (intptr_t i = comparison->InputCount() - 1; i >= 0; --i) {
10971 }
10972 }
ComparisonInstr * comparison() const
Definition: il.h:10974
virtual intptr_t InputCount() const =0
Instruction(const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
Definition: il.h:980
virtual Value * InputAt(intptr_t i) const =0
Environment * env() const
Definition: il.h:1215
virtual intptr_t ArgumentCount() const
Definition: il.h:1041
intptr_t deopt_id() const
Definition: il.h:993
void set_instruction(Instruction *instruction)
Definition: il.h:122
#define ASSERT(E)

Member Function Documentation

◆ AllowsCSE()

virtual bool dart::CheckConditionInstr::AllowsCSE ( ) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 10982 of file il.h.

10982{ return true; }

◆ AttributesEqual()

virtual bool dart::CheckConditionInstr::AttributesEqual ( const Instruction other) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 10985 of file il.h.

10985 {
10986 return other.AsCheckCondition()->comparison()->AttributesEqual(
10987 *comparison());
10988 }

◆ Canonicalize()

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

Reimplemented from dart::Instruction.

Definition at line 6732 of file il.cc.

6732 {
6733 if (StrictCompareInstr* strict_compare = comparison()->AsStrictCompare()) {
6734 if ((InputAt(0)->definition()->OriginalDefinition() ==
6735 InputAt(1)->definition()->OriginalDefinition()) &&
6736 strict_compare->kind() == Token::kEQ_STRICT) {
6737 return nullptr;
6738 }
6739 }
6740 return this;
6741}
virtual Value * InputAt(intptr_t i) const
Definition: il.h:10991
friend class StrictCompareInstr
Definition: il.h:1406

◆ comparison()

ComparisonInstr * dart::CheckConditionInstr::comparison ( ) const
inline

Definition at line 10974 of file il.h.

10974{ return comparison_; }

◆ ComputeCanDeoptimize()

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

Implements dart::Instruction.

Definition at line 10978 of file il.h.

10978{ return true; }

◆ CopyDeoptIdFrom()

virtual void dart::CheckConditionInstr::CopyDeoptIdFrom ( const Instruction instr)
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 10995 of file il.h.

10995 {
10997 comparison()->CopyDeoptIdFrom(instr);
10998 }
virtual void CopyDeoptIdFrom(const Instruction &instr)
Definition: il.h:1411

◆ DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS()

dart::CheckConditionInstr::DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS ( CheckConditionInstr  ,
Instruction  ,
FIELD_LIST   
)
inline

Definition at line 11004 of file il.h.

11010 :
11011 virtual void RawSetInputAt(intptr_t i, Value* value) {
11012 comparison()->RawSetInputAt(i, value);
11013 }
virtual void RawSetInputAt(intptr_t i, Value *value)=0
uint8_t value

◆ DISALLOW_COPY_AND_ASSIGN()

dart::CheckConditionInstr::DISALLOW_COPY_AND_ASSIGN ( CheckConditionInstr  )

◆ HasUnknownSideEffects()

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

Implements dart::Instruction.

Definition at line 10983 of file il.h.

10983{ return false; }

◆ InputAt()

virtual Value * dart::CheckConditionInstr::InputAt ( intptr_t  i) const
inlinevirtual

Implements dart::Instruction.

Definition at line 10991 of file il.h.

10991{ return comparison()->InputAt(i); }

◆ InputCount()

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

Implements dart::Instruction.

Definition at line 10990 of file il.h.

10990{ return comparison()->InputCount(); }

◆ MayThrow()

virtual bool dart::CheckConditionInstr::MayThrow ( ) const
inlinevirtual

Implements dart::Instruction.

Definition at line 10993 of file il.h.

10993{ return false; }

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