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

#include <il.h>

Inheritance diagram for dart::AllocateObjectInstr:
dart::AllocationInstr dart::Definition dart::Instruction dart::ZoneAllocated

Public Types

enum  { kTypeArgumentsPos = 0 }
 
- 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

 AllocateObjectInstr (const InstructionSource &source, const Class &cls, intptr_t deopt_id, Value *type_arguments=nullptr)
 
virtual CompileType ComputeType () const
 
const Classcls () const
 
Valuetype_arguments () const
 
virtual intptr_t InputCount () const
 
virtual ValueInputAt (intptr_t i) const
 
virtual bool HasUnknownSideEffects () const
 
virtual bool MayHaveVisibleEffect () const
 
virtual bool WillAllocateNewOrRemembered () const
 
virtual const SlotSlotForInput (intptr_t pos)
 
 DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS (AllocateObjectInstr, AllocationInstr, FIELD_LIST) private
 
 DISALLOW_COPY_AND_ASSIGN (AllocateObjectInstr)
 
- Public Member Functions inherited from dart::AllocationInstr
 AllocationInstr (const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
 
virtual TokenPosition token_pos () const
 
virtual AliasIdentity Identity () const
 
virtual void SetIdentity (AliasIdentity identity)
 
virtual bool MayThrow () const
 
virtual bool ComputeCanDeoptimize () const
 
virtual bool ComputeCanDeoptimizeAfterCall () const
 
virtual intptr_t NumberOfInputsConsumedBeforeCall () const
 
intptr_t InputForSlot (const Slot &slot)
 
virtual bool ObjectIsInitialized ()
 
PRINT_OPERANDS_TO_SUPPORT DECLARE_ABSTRACT_INSTRUCTION (Allocation)
 
- 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 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)
 
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
 
InstructionSource source () const
 
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
 
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)
 
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
 
void InsertBefore (Instruction *next)
 
void InsertAfter (Instruction *prev)
 
InstructionAppendInstruction (Instruction *tail)
 
virtual bool AllowsCSE () const
 
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)
 
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)
 

Static Public Member Functions

static bool WillAllocateNewOrRemembered (const Class &cls)
 
- 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)
 

Public Attributes

Valuetype_arguments_ = nullptr
 

Additional Inherited Members

- 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::Definition
Rangerange_ = nullptr
 

Detailed Description

Definition at line 7371 of file il.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kTypeArgumentsPos 

Definition at line 7373 of file il.h.

Constructor & Destructor Documentation

◆ AllocateObjectInstr()

dart::AllocateObjectInstr::AllocateObjectInstr ( const InstructionSource source,
const Class cls,
intptr_t  deopt_id,
Value type_arguments = nullptr 
)
inline

Definition at line 7374 of file il.h.

7379 cls_(cls),
7380 has_type_arguments_(type_arguments != nullptr),
7381 type_arguments_slot_(nullptr),
7383 DEBUG_ASSERT(cls.IsNotTemporaryScopedHandle());
7384 ASSERT(!cls.IsNull());
7385 ASSERT((cls.NumTypeArguments() > 0) == has_type_arguments_);
7386 if (has_type_arguments_) {
7388 type_arguments_slot_ =
7390 }
7391 }
#define DEBUG_ASSERT(cond)
Definition assert.h:321
Value * type_arguments() const
Definition il.h:7397
const Class & cls() const
Definition il.h:7396
Value * type_arguments_
Definition il.h:7442
AllocationInstr(const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
Definition il.h:7275
intptr_t NumTypeArguments() const
Definition object.cc:3690
void SetInputAt(intptr_t i, Value *value)
Definition il.h:1008
InstructionSource source() const
Definition il.h:1002
intptr_t deopt_id() const
Definition il.h:987
bool IsNull() const
Definition object.h:363
static const Slot & GetTypeArgumentsSlotFor(Thread *thread, const Class &cls)
Definition slot.cc:276
static Thread * Current()
Definition thread.h:361
#define ASSERT(E)

Member Function Documentation

◆ cls()

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

Definition at line 7396 of file il.h.

7396{ return cls_; }

◆ ComputeType()

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

Reimplemented from dart::Definition.

Definition at line 1682 of file type_propagator.cc.

1682 {
1683 // TODO(vegorov): Incorporate type arguments into the returned type.
1684 return CompileType::FromCid(cls().id());
1685}
static CompileType FromCid(intptr_t cid)

◆ DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS()

dart::AllocateObjectInstr::DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS ( AllocateObjectInstr  ,
AllocationInstr  ,
FIELD_LIST   
)
inline

Definition at line 7431 of file il.h.

7436 :
7437 virtual void RawSetInputAt(intptr_t i, Value* value) {
7438 ASSERT(has_type_arguments_ && (i == kTypeArgumentsPos));
7440 }
virtual void RawSetInputAt(intptr_t i, Value *value)=0
uint8_t value

◆ DISALLOW_COPY_AND_ASSIGN()

dart::AllocateObjectInstr::DISALLOW_COPY_AND_ASSIGN ( AllocateObjectInstr  )

◆ HasUnknownSideEffects()

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

Implements dart::Instruction.

Definition at line 7405 of file il.h.

7405{ return false; }

◆ InputAt()

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

Implements dart::Instruction.

Definition at line 7400 of file il.h.

7400 {
7401 ASSERT(has_type_arguments_ && i == kTypeArgumentsPos);
7402 return type_arguments_;
7403 }

◆ InputCount()

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

Implements dart::Instruction.

Definition at line 7399 of file il.h.

7399{ return has_type_arguments_ ? 1 : 0; }

◆ MayHaveVisibleEffect()

virtual bool dart::AllocateObjectInstr::MayHaveVisibleEffect ( ) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 7410 of file il.h.

7410{ return false; }

◆ SlotForInput()

virtual const Slot * dart::AllocateObjectInstr::SlotForInput ( intptr_t  pos)
inlinevirtual

Reimplemented from dart::AllocationInstr.

Definition at line 7420 of file il.h.

7420 {
7421 return pos == kTypeArgumentsPos ? type_arguments_slot_ : nullptr;
7422 }
SkPoint pos

◆ type_arguments()

Value * dart::AllocateObjectInstr::type_arguments ( ) const
inline

Definition at line 7397 of file il.h.

7397{ return type_arguments_; }

◆ WillAllocateNewOrRemembered() [1/2]

virtual bool dart::AllocateObjectInstr::WillAllocateNewOrRemembered ( ) const
inlinevirtual

Implements dart::AllocationInstr.

Definition at line 7412 of file il.h.

7412 {
7414 }
virtual bool WillAllocateNewOrRemembered() const
Definition il.h:7412

◆ WillAllocateNewOrRemembered() [2/2]

static bool dart::AllocateObjectInstr::WillAllocateNewOrRemembered ( const Class cls)
inlinestatic

Definition at line 7416 of file il.h.

7416 {
7418 }
intptr_t target_instance_size() const
Definition object.h:1149
bool IsAllocatableInNewSpace(intptr_t size)
Definition spaces.h:57

Member Data Documentation

◆ type_arguments_

Value* dart::AllocateObjectInstr::type_arguments_ = nullptr

Definition at line 7442 of file il.h.


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