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

#include <il.h>

Inheritance diagram for dart::MaterializeObjectInstr:
dart::VariadicDefinition dart::Definition dart::Instruction dart::ZoneAllocated

Public Member Functions

 MaterializeObjectInstr (AllocationInstr *allocation, const Class &cls, intptr_t length_or_shape, const ZoneGrowableArray< const Slot * > &slots, InputsArray &&values)
 
AllocationInstrallocation () const
 
const Classcls () const
 
intptr_t length_or_shape () const
 
intptr_t FieldOffsetAt (intptr_t i) const
 
const LocationLocationAt (intptr_t i)
 
virtual Representation RequiredInputRepresentation (intptr_t idx) const
 
virtual bool ComputeCanDeoptimize () const
 
virtual bool HasUnknownSideEffects () const
 
virtual bool CanReplaceWithConstant () const
 
Locationlocations ()
 
void set_locations (Location *locations)
 
virtual bool MayThrow () const
 
void RemapRegisters (intptr_t *cpu_reg_slots, intptr_t *fpu_reg_slots)
 
bool was_visited_for_liveness () const
 
void mark_visited_for_liveness ()
 
 DISALLOW_COPY_AND_ASSIGN (MaterializeObjectInstr)
 
- Public Member Functions inherited from dart::VariadicDefinition
 VariadicDefinition (InputsArray &&inputs, intptr_t deopt_id=DeoptId::kNone)
 
 VariadicDefinition (InputsArray &&inputs, const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
 
 VariadicDefinition (const intptr_t num_inputs, intptr_t deopt_id=DeoptId::kNone)
 
intptr_t InputCount () const
 
ValueInputAt (intptr_t i) const
 
- Public Member Functions inherited from dart::Definition
 Definition (intptr_t deopt_id=DeoptId::kNone)
 
 Definition (const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
 
virtual intptr_t CallCount () const
 
intptr_t temp_index () const
 
void set_temp_index (intptr_t index)
 
void ClearTempIndex ()
 
bool HasTemp () const
 
intptr_t ssa_temp_index () const
 
void set_ssa_temp_index (intptr_t index)
 
bool HasSSATemp () const
 
void ClearSSATempIndex ()
 
intptr_t vreg (intptr_t index) const
 
intptr_t location_count () const
 
bool HasPairRepresentation () const
 
CompileTypeType ()
 
bool HasType () const
 
bool IsInt64Definition ()
 
bool IsInt32Definition ()
 
virtual CompileType ComputeType () const
 
virtual bool RecomputeType ()
 
PRINT_OPERANDS_TO_SUPPORT PRINT_TO_SUPPORT bool UpdateType (CompileType new_type)
 
bool HasUses () const
 
bool HasOnlyUse (Value *use) const
 
bool HasOnlyInputUse (Value *use) const
 
Valueinput_use_list () const
 
void set_input_use_list (Value *head)
 
Valueenv_use_list () const
 
void set_env_use_list (Value *head)
 
ValueListIterable input_uses () const
 
void AddInputUse (Value *value)
 
void AddEnvUse (Value *value)
 
virtual bool MayCreateUnsafeUntaggedPointer () const
 
virtual bool CanReplaceWithConstant () const
 
virtual bool CanEliminate (const BlockEntryInstr *block) const
 
void ReplaceUsesWith (Definition *other)
 
void ReplaceWithResult (Instruction *replacement, Definition *replacement_for_uses, ForwardInstructionIterator *iterator)
 
void ReplaceWith (Definition *other, ForwardInstructionIterator *iterator)
 
Objectconstant_value ()
 
virtual void InferRange (RangeAnalysis *analysis, Range *range)
 
Rangerange () const
 
void set_range (const Range &)
 
virtual DefinitionCanonicalize (FlowGraph *flow_graph)
 
DefinitionReplacement ()
 
void SetReplacement (Definition *other)
 
virtual AliasIdentity Identity () const
 
virtual void SetIdentity (AliasIdentity identity)
 
DefinitionOriginalDefinition ()
 
virtual ValueRedefinedValue () const
 
DefinitionOriginalDefinitionIgnoreBoxingAndConstraints ()
 
virtual DefinitionAsDefinition ()
 
virtual const DefinitionAsDefinition () 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)
 

Public Attributes

DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(MaterializeObjectInstr, VariadicDefinition, FIELD_LIST) DECLARE_EXTRA_SERIALIZATION private AllocationInstrallocation_ = nullptr
 
bool visited_for_liveness_ = false
 

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::Definition
static bool IsArrayLength (Definition *def)
 
- 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::Definition
static constexpr intptr_t kReplacementMarker = -2
 
- Static Public Attributes inherited from dart::Instruction
static const intptr_t kInstructionAttrs [kNumInstructions]
 
- Protected Member Functions inherited from dart::Definition
void set_type (CompileType *type)
 
- 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::VariadicDefinition
InputsArray inputs_
 
- Protected Attributes inherited from dart::Definition
Rangerange_ = nullptr
 

Detailed Description

Definition at line 7705 of file il.h.

Constructor & Destructor Documentation

◆ MaterializeObjectInstr()

dart::MaterializeObjectInstr::MaterializeObjectInstr ( AllocationInstr allocation,
const Class cls,
intptr_t  length_or_shape,
const ZoneGrowableArray< const Slot * > &  slots,
InputsArray &&  values 
)
inline

Definition at line 7707 of file il.h.

7712 : VariadicDefinition(std::move(values)),
7713 cls_(cls),
7714 length_or_shape_(length_or_shape),
7715 slots_(slots),
7716 registers_remapped_(false),
7718 ASSERT(slots_.length() == InputCount());
7719 }
AllocationInstr * allocation() const
Definition: il.h:7721
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(MaterializeObjectInstr, VariadicDefinition, FIELD_LIST) DECLARE_EXTRA_SERIALIZATION private AllocationInstr * allocation_
Definition: il.h:7779
const Class & cls() const
Definition: il.h:7722
intptr_t length_or_shape() const
Definition: il.h:7724
VariadicDefinition(InputsArray &&inputs, intptr_t deopt_id=DeoptId::kNone)
Definition: il.h:2773
intptr_t InputCount() const
Definition: il.h:2794
#define ASSERT(E)

Member Function Documentation

◆ allocation()

AllocationInstr * dart::MaterializeObjectInstr::allocation ( ) const
inline

Definition at line 7721 of file il.h.

7721{ return allocation_; }

◆ CanReplaceWithConstant()

virtual bool dart::MaterializeObjectInstr::CanReplaceWithConstant ( ) const
inlinevirtual

Reimplemented from dart::Definition.

Definition at line 7749 of file il.h.

7749{ return false; }

◆ cls()

const Class & dart::MaterializeObjectInstr::cls ( ) const
inline

Definition at line 7722 of file il.h.

7722{ return cls_; }

◆ ComputeCanDeoptimize()

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

Implements dart::Instruction.

Definition at line 7747 of file il.h.

7747{ return false; }

◆ DISALLOW_COPY_AND_ASSIGN()

dart::MaterializeObjectInstr::DISALLOW_COPY_AND_ASSIGN ( MaterializeObjectInstr  )

◆ FieldOffsetAt()

intptr_t dart::MaterializeObjectInstr::FieldOffsetAt ( intptr_t  i) const
inline

Definition at line 7726 of file il.h.

7726 {
7727 return slots_[i]->offset_in_bytes();
7728 }

◆ HasUnknownSideEffects()

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

Implements dart::Instruction.

Definition at line 7748 of file il.h.

7748{ return false; }

◆ length_or_shape()

intptr_t dart::MaterializeObjectInstr::length_or_shape ( ) const
inline

Definition at line 7724 of file il.h.

7724{ return length_or_shape_; }

◆ LocationAt()

const Location & dart::MaterializeObjectInstr::LocationAt ( intptr_t  i)
inline

Definition at line 7730 of file il.h.

7730 {
7731 ASSERT(0 <= i && i < InputCount());
7732 return locations_[i];
7733 }

◆ locations()

Location * dart::MaterializeObjectInstr::locations ( )
inline

Definition at line 7751 of file il.h.

7751{ return locations_; }

◆ mark_visited_for_liveness()

void dart::MaterializeObjectInstr::mark_visited_for_liveness ( )
inline

Definition at line 7759 of file il.h.

7759{ visited_for_liveness_ = true; }

◆ MayThrow()

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

Implements dart::Instruction.

Definition at line 7754 of file il.h.

7754{ return false; }

◆ RemapRegisters()

void dart::MaterializeObjectInstr::RemapRegisters ( intptr_t *  cpu_reg_slots,
intptr_t *  fpu_reg_slots 
)

Definition at line 4970 of file il.cc.

4971 {
4972 if (registers_remapped_) {
4973 return;
4974 }
4975 registers_remapped_ = true;
4976
4977 for (intptr_t i = 0; i < InputCount(); i++) {
4978 locations_[i] = LocationRemapForSlowPath(
4979 LocationAt(i), InputAt(i)->definition(), cpu_reg_slots, fpu_reg_slots);
4980 }
4981}
const Location & LocationAt(intptr_t i)
Definition: il.h:7730
Value * InputAt(intptr_t i) const
Definition: il.h:2795
Location LocationRemapForSlowPath(Location loc, Definition *def, intptr_t *cpu_reg_slots, intptr_t *fpu_reg_slots)
Definition: locations.cc:492

◆ RequiredInputRepresentation()

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

Reimplemented from dart::Instruction.

Definition at line 7742 of file il.h.

7742 {
7743 ASSERT(0 <= idx && idx < InputCount());
7744 return kNoRepresentation;
7745 }

◆ set_locations()

void dart::MaterializeObjectInstr::set_locations ( Location locations)
inline

Definition at line 7752 of file il.h.

7752{ locations_ = locations; }
Location * locations()
Definition: il.h:7751

◆ was_visited_for_liveness()

bool dart::MaterializeObjectInstr::was_visited_for_liveness ( ) const
inline

Definition at line 7758 of file il.h.

7758{ return visited_for_liveness_; }

Member Data Documentation

◆ allocation_

Definition at line 7779 of file il.h.

◆ visited_for_liveness_

bool dart::MaterializeObjectInstr::visited_for_liveness_ = false

Definition at line 7780 of file il.h.


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