Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::TemplateDartCall< kExtraInputs > Class Template Reference

#include <il.h>

Inheritance diagram for dart::TemplateDartCall< kExtraInputs >:
dart::VariadicDefinition dart::Definition dart::Instruction dart::ZoneAllocated

Public Member Functions

 TemplateDartCall (intptr_t deopt_id, intptr_t type_args_len, const Array &argument_names, InputsArray &&inputs, const InstructionSource &source)
 
StringPtr Selector ()
 
virtual bool MayThrow () const
 
virtual bool CanCallDart () const
 
virtual bool ComputeCanDeoptimize () const
 
virtual bool ComputeCanDeoptimizeAfterCall () const
 
virtual intptr_t NumberOfInputsConsumedBeforeCall () const
 
intptr_t FirstArgIndex () const
 
ValueReceiver () const
 
intptr_t ArgumentCountWithoutTypeArgs () const
 
intptr_t ArgumentsSizeWithoutTypeArgs () const
 
intptr_t ArgumentCount () const
 
virtual intptr_t ArgumentsSize () const
 
virtual void SetMoveArguments (MoveArgumentsArray *move_arguments)
 
virtual MoveArgumentsArrayGetMoveArguments () const
 
virtual void ReplaceInputsWithMoveArguments (MoveArgumentsArray *move_arguments)
 
intptr_t type_args_len () const
 
const Arrayargument_names () const
 
virtual TokenPosition token_pos () const
 
ArrayPtr GetArgumentsDescriptor () const
 
- 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)
 

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

template<intptr_t kExtraInputs>
class dart::TemplateDartCall< kExtraInputs >

Definition at line 4548 of file il.h.

Constructor & Destructor Documentation

◆ TemplateDartCall()

template<intptr_t kExtraInputs>
dart::TemplateDartCall< kExtraInputs >::TemplateDartCall ( intptr_t  deopt_id,
intptr_t  type_args_len,
const Array argument_names,
InputsArray &&  inputs,
const InstructionSource source 
)
inline

Definition at line 4550 of file il.h.

4555 : VariadicDefinition(std::move(inputs), source, deopt_id),
4556 type_args_len_(type_args_len),
4557 argument_names_(argument_names),
4558 token_pos_(source.token_pos) {
4559 DEBUG_ASSERT(argument_names.IsNotTemporaryScopedHandle());
4560 ASSERT(InputCount() >= kExtraInputs);
4561 }
#define DEBUG_ASSERT(cond)
Definition: assert.h:321
InputsIterable inputs()
Definition: il.h:1033
InstructionSource source() const
Definition: il.h:1008
intptr_t deopt_id() const
Definition: il.h:993
intptr_t type_args_len() const
Definition: il.h:4614
const Array & argument_names() const
Definition: il.h:4615
VariadicDefinition(InputsArray &&inputs, intptr_t deopt_id=DeoptId::kNone)
Definition: il.h:2773
intptr_t InputCount() const
Definition: il.h:2794
#define ASSERT(E)
const TokenPosition token_pos

Member Function Documentation

◆ argument_names()

template<intptr_t kExtraInputs>
const Array & dart::TemplateDartCall< kExtraInputs >::argument_names ( ) const
inline

Definition at line 4615 of file il.h.

4615{ return argument_names_; }

◆ ArgumentCount()

template<intptr_t kExtraInputs>
intptr_t dart::TemplateDartCall< kExtraInputs >::ArgumentCount ( ) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 4586 of file il.h.

4586 {
4587 return move_arguments_ != nullptr ? move_arguments_->length()
4588 : InputCount() - kExtraInputs;
4589 }
intptr_t length() const

◆ ArgumentCountWithoutTypeArgs()

template<intptr_t kExtraInputs>
intptr_t dart::TemplateDartCall< kExtraInputs >::ArgumentCountWithoutTypeArgs ( ) const
inline

Definition at line 4578 of file il.h.

4578 {
4579 return ArgumentCount() - FirstArgIndex();
4580 }
intptr_t ArgumentCount() const
Definition: il.h:4586
intptr_t FirstArgIndex() const
Definition: il.h:4576

◆ ArgumentsSize()

template<intptr_t kExtraInputs>
virtual intptr_t dart::TemplateDartCall< kExtraInputs >::ArgumentsSize ( ) const
inlinevirtual

◆ ArgumentsSizeWithoutTypeArgs()

template<intptr_t kExtraInputs>
intptr_t dart::TemplateDartCall< kExtraInputs >::ArgumentsSizeWithoutTypeArgs ( ) const
inline

Definition at line 4581 of file il.h.

4581 {
4582 return ArgumentsSize() - FirstArgIndex();
4583 }
virtual intptr_t ArgumentsSize() const
Definition: il.h:4590

◆ CanCallDart()

template<intptr_t kExtraInputs>
virtual bool dart::TemplateDartCall< kExtraInputs >::CanCallDart ( ) const
inlinevirtual

Reimplemented from dart::Instruction.

Reimplemented in dart::StaticCallInstr, dart::CachableIdempotentCallInstr, and dart::NativeCallInstr.

Definition at line 4566 of file il.h.

4566{ return true; }

◆ ComputeCanDeoptimize()

template<intptr_t kExtraInputs>
virtual bool dart::TemplateDartCall< kExtraInputs >::ComputeCanDeoptimize ( ) const
inlinevirtual

Implements dart::Instruction.

Reimplemented in dart::StaticCallInstr, dart::CachableIdempotentCallInstr, and dart::NativeCallInstr.

Definition at line 4568 of file il.h.

4568{ return false; }

◆ ComputeCanDeoptimizeAfterCall()

template<intptr_t kExtraInputs>
virtual bool dart::TemplateDartCall< kExtraInputs >::ComputeCanDeoptimizeAfterCall ( ) const
inlinevirtual

Reimplemented from dart::Instruction.

Reimplemented in dart::StaticCallInstr, and dart::CachableIdempotentCallInstr.

Definition at line 4569 of file il.h.

4569 {
4570 return !CompilerState::Current().is_aot();
4571 }
bool is_aot() const
static CompilerState & Current()

◆ FirstArgIndex()

template<intptr_t kExtraInputs>
intptr_t dart::TemplateDartCall< kExtraInputs >::FirstArgIndex ( ) const
inline

Definition at line 4576 of file il.h.

4576{ return type_args_len_ > 0 ? 1 : 0; }

◆ GetArgumentsDescriptor()

template<intptr_t kExtraInputs>
ArrayPtr dart::TemplateDartCall< kExtraInputs >::GetArgumentsDescriptor ( ) const
inline

Definition at line 4617 of file il.h.

4617 {
4621 }
static ArrayPtr New(intptr_t type_args_len, intptr_t num_arguments, intptr_t size_arguments, const Array &optional_arguments_names, Heap::Space space=Heap::kOld)
Definition: dart_entry.cc:444
intptr_t ArgumentCountWithoutTypeArgs() const
Definition: il.h:4578
intptr_t ArgumentsSizeWithoutTypeArgs() const
Definition: il.h:4581

◆ GetMoveArguments()

template<intptr_t kExtraInputs>
virtual MoveArgumentsArray * dart::TemplateDartCall< kExtraInputs >::GetMoveArguments ( ) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 4596 of file il.h.

4596 {
4597 return move_arguments_;
4598 }

◆ MayThrow()

template<intptr_t kExtraInputs>
virtual bool dart::TemplateDartCall< kExtraInputs >::MayThrow ( ) const
inlinevirtual

Implements dart::Instruction.

Definition at line 4565 of file il.h.

4565{ return true; }

◆ NumberOfInputsConsumedBeforeCall()

template<intptr_t kExtraInputs>
virtual intptr_t dart::TemplateDartCall< kExtraInputs >::NumberOfInputsConsumedBeforeCall ( ) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 4572 of file il.h.

4572 {
4573 return kExtraInputs;
4574 }

◆ Receiver()

template<intptr_t kExtraInputs>
Value * dart::TemplateDartCall< kExtraInputs >::Receiver ( ) const
inline

Definition at line 4577 of file il.h.

4577{ return this->ArgumentValueAt(FirstArgIndex()); }
Value * ArgumentValueAt(intptr_t index) const
Definition: il.h:3435

◆ ReplaceInputsWithMoveArguments()

template<intptr_t kExtraInputs>
virtual void dart::TemplateDartCall< kExtraInputs >::ReplaceInputsWithMoveArguments ( MoveArgumentsArray move_arguments)
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 4599 of file il.h.

4600 {
4601 ASSERT(move_arguments_ == nullptr);
4602 ASSERT(move_arguments->length() == ArgumentCount());
4603 SetMoveArguments(move_arguments);
4604 ASSERT(InputCount() == ArgumentCount() + kExtraInputs);
4605 const intptr_t extra_inputs_base = InputCount() - kExtraInputs;
4606 for (intptr_t i = 0, n = ArgumentCount(); i < n; ++i) {
4608 }
4609 for (intptr_t i = 0; i < kExtraInputs; ++i) {
4610 SetInputAt(i, InputAt(extra_inputs_base + i));
4611 }
4612 inputs_.TruncateTo(kExtraInputs);
4613 }
void TruncateTo(intptr_t length)
void SetInputAt(intptr_t i, Value *value)
Definition: il.h:1014
virtual void SetMoveArguments(MoveArgumentsArray *move_arguments)
Definition: il.h:4592
void RemoveFromUseList()
Definition: il.cc:1457
InputsArray inputs_
Definition: il.h:2800
Value * InputAt(intptr_t i) const
Definition: il.h:2795

◆ Selector()

template<intptr_t kExtraInputs>
StringPtr dart::TemplateDartCall< kExtraInputs >::Selector
inline

Definition at line 11877 of file il.h.

11877 {
11878 if (auto static_call = this->AsStaticCall()) {
11879 return static_call->function().name();
11880 } else if (auto instance_call = this->AsInstanceCall()) {
11881 return instance_call->function_name().ptr();
11882 } else {
11883 UNREACHABLE();
11884 }
11885}
#define UNREACHABLE()
Definition: assert.h:248

◆ SetMoveArguments()

template<intptr_t kExtraInputs>
virtual void dart::TemplateDartCall< kExtraInputs >::SetMoveArguments ( MoveArgumentsArray move_arguments)
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 4592 of file il.h.

4592 {
4593 ASSERT(move_arguments_ == nullptr);
4594 move_arguments_ = move_arguments;
4595 }

◆ token_pos()

template<intptr_t kExtraInputs>
virtual TokenPosition dart::TemplateDartCall< kExtraInputs >::token_pos ( ) const
inlinevirtual

Reimplemented from dart::Instruction.

Reimplemented in dart::NativeCallInstr.

Definition at line 4616 of file il.h.

4616{ return token_pos_; }

◆ type_args_len()

template<intptr_t kExtraInputs>
intptr_t dart::TemplateDartCall< kExtraInputs >::type_args_len ( ) const
inline

Definition at line 4614 of file il.h.

4614{ return type_args_len_; }

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