Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
dart::CheckArrayBoundInstr Class Reference

#include <il.h>

Inheritance diagram for dart::CheckArrayBoundInstr:
dart::CheckBoundBaseInstr dart::TemplateDefinition< 2, NoThrow, Pure >

Public Member Functions

 CheckArrayBoundInstr (Value *length, Value *index, intptr_t deopt_id)
 
virtual CompileType ComputeType () const
 
virtual bool RecomputeType ()
 
virtual bool ComputeCanDeoptimize () const
 
void mark_generalized ()
 
virtual bool AttributesEqual (const Instruction &other) const
 
- Public Member Functions inherited from dart::CheckBoundBaseInstr
 CheckBoundBaseInstr (Value *length, Value *index, intptr_t deopt_id)
 
Valuelength () const
 
Valueindex () const
 
virtual DefinitionCanonicalize (FlowGraph *flow_graph)
 
 DECLARE_ABSTRACT_INSTRUCTION (CheckBoundBase)
 
virtual ValueRedefinedValue () const
 
bool IsRedundant (bool use_loops=false)
 
- Public Member Functions inherited from dart::TemplateDefinition< 2, NoThrow, Pure >
 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
 

Static Public Member Functions

static intptr_t LengthOffsetFor (intptr_t class_id)
 
static bool IsFixedLengthArrayType (intptr_t class_id)
 

Additional Inherited Members

- Public Types inherited from dart::CheckBoundBaseInstr
enum  { kLengthPos = 0 , kIndexPos = 1 }
 
- Public Types inherited from dart::TemplateDefinition< 2, NoThrow, Pure >
using BaseClass = typename Pure< Definition, PureDefinition >::Base
 
- Protected Attributes inherited from dart::TemplateDefinition< 2, NoThrow, Pure >
EmbeddedArray< Value *, Ninputs_
 

Detailed Description

Definition at line 10769 of file il.h.

Constructor & Destructor Documentation

◆ CheckArrayBoundInstr()

dart::CheckArrayBoundInstr::CheckArrayBoundInstr ( Value length,
Value index,
intptr_t  deopt_id 
)
inline

Definition at line 10771 of file il.h.

10772 : CheckBoundBaseInstr(length, index, deopt_id), generalized_(false) {}
CheckBoundBaseInstr(Value *length, Value *index, intptr_t deopt_id)
Definition il.h:10736
Value * index() const
Definition il.h:10743
Value * length() const
Definition il.h:10742

Member Function Documentation

◆ AttributesEqual()

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

Definition at line 10788 of file il.h.

10788{ return true; }

◆ ComputeCanDeoptimize()

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

Definition at line 10779 of file il.h.

10779{ return true; }

◆ ComputeType()

CompileType dart::CheckArrayBoundInstr::ComputeType ( ) const
virtual

Definition at line 1175 of file type_propagator.cc.

1175 {
1176 return *index()->Type();
1177}
CompileType * Type()

◆ IsFixedLengthArrayType()

bool dart::CheckArrayBoundInstr::IsFixedLengthArrayType ( intptr_t  class_id)
static

Definition at line 6769 of file il.cc.

6769 {
6771}
static bool IsFixedLengthArrayCid(intptr_t cid)
Definition il.cc:2659
const intptr_t cid

◆ LengthOffsetFor()

intptr_t dart::CheckArrayBoundInstr::LengthOffsetFor ( intptr_t  class_id)
static

Definition at line 6779 of file il.cc.

6779 {
6780 if (IsTypedDataBaseClassId(class_id)) {
6781 return compiler::target::TypedDataBase::length_offset();
6782 }
6783
6784 switch (class_id) {
6785 case kGrowableObjectArrayCid:
6786 return compiler::target::GrowableObjectArray::length_offset();
6787 case kOneByteStringCid:
6788 case kTwoByteStringCid:
6789 return compiler::target::String::length_offset();
6790 case kArrayCid:
6791 case kImmutableArrayCid:
6792 return compiler::target::Array::length_offset();
6793 default:
6794 UNREACHABLE();
6795 return -1;
6796 }
6797}
#define UNREACHABLE()
Definition assert.h:248
bool IsTypedDataBaseClassId(intptr_t index)
Definition class_id.h:429

◆ mark_generalized()

void dart::CheckArrayBoundInstr::mark_generalized ( )
inline

Definition at line 10781 of file il.h.

10781{ generalized_ = true; }

◆ RecomputeType()

bool dart::CheckArrayBoundInstr::RecomputeType ( )
virtual

Definition at line 1179 of file type_propagator.cc.

1179 {
1180 return UpdateType(ComputeType());
1181}
virtual CompileType ComputeType() const

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