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

#include <il.h>

Inheritance diagram for dart::InstanceCallBaseInstr:
dart::TemplateDartCall< 0 > dart::VariadicDefinition dart::Definition dart::Instruction dart::ZoneAllocated dart::InstanceCallInstr dart::PolymorphicInstanceCallInstr

Public Member Functions

 InstanceCallBaseInstr (const InstructionSource &source, const String &function_name, Token::Kind token_kind, InputsArray &&arguments, intptr_t type_args_len, const Array &argument_names, const ICData *ic_data, intptr_t deopt_id, const Function &interface_target, const Function &tearoff_interface_target)
 
const ICDataic_data () const
 
bool HasICData () const
 
void set_ic_data (const ICData *value)
 
const Stringfunction_name () const
 
Token::Kind token_kind () const
 
const Functioninterface_target () const
 
const Functiontearoff_interface_target () const
 
bool has_unique_selector () const
 
void set_has_unique_selector (bool b)
 
virtual CompileType ComputeType () const
 
virtual bool CanBecomeDeoptimizationTarget () const
 
virtual bool HasUnknownSideEffects () const
 
void SetResultType (Zone *zone, CompileType new_type)
 
CompileTyperesult_type () const
 
intptr_t result_cid () const
 
FunctionPtr ResolveForReceiverClass (const Class &cls, bool allow_add=true)
 
Code::EntryKind entry_kind () const
 
void set_entry_kind (Code::EntryKind value)
 
void mark_as_call_on_this ()
 
bool is_call_on_this () const
 
 DECLARE_ABSTRACT_INSTRUCTION (InstanceCallBase)
 
bool receiver_is_not_smi () const
 
void set_receiver_is_not_smi (bool value)
 
void UpdateReceiverSminess (Zone *zone)
 
bool CanReceiverBeSmiBasedOnInterfaceTarget (Zone *zone) const
 
virtual SpeculativeMode SpeculativeModeOfInput (intptr_t idx) const
 
virtual intptr_t ArgumentsSize () const
 
virtual Representation RequiredInputRepresentation (intptr_t idx) const
 
virtual intptr_t DeoptimizationTarget () const
 
virtual Representation representation () const
 
DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(InstanceCallBaseInstr, TemplateDartCall, FIELD_LIST) protected void set_ic_data (ICData *value)
 
void set_result_type (CompileType *result_type)
 
- Public Member Functions inherited from dart::TemplateDartCall< 0 >
 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

Definition at line 4675 of file il.h.

Constructor & Destructor Documentation

◆ InstanceCallBaseInstr()

dart::InstanceCallBaseInstr::InstanceCallBaseInstr ( const InstructionSource source,
const String function_name,
Token::Kind  token_kind,
InputsArray &&  arguments,
intptr_t  type_args_len,
const Array argument_names,
const ICData ic_data,
intptr_t  deopt_id,
const Function interface_target,
const Function tearoff_interface_target 
)
inline

Definition at line 4677 of file il.h.

4690 std::move(arguments),
4691 source),
4692 ic_data_(ic_data),
4693 function_name_(function_name),
4694 token_kind_(token_kind),
4695 interface_target_(interface_target),
4696 tearoff_interface_target_(tearoff_interface_target),
4697 result_type_(nullptr),
4698 has_unique_selector_(false),
4699 entry_kind_(Code::EntryKind::kNormal),
4700 receiver_is_not_smi_(false),
4701 is_call_on_this_(false) {
4702 DEBUG_ASSERT(function_name.IsNotTemporaryScopedHandle());
4703 DEBUG_ASSERT(interface_target.IsNotTemporaryScopedHandle());
4704 DEBUG_ASSERT(tearoff_interface_target.IsNotTemporaryScopedHandle());
4705 ASSERT(InputCount() > 0);
4712 Token::IsTypeCastOperator(token_kind) || token_kind == Token::kGET ||
4713 token_kind == Token::kSET || token_kind == Token::kILLEGAL);
4714 }
#define DEBUG_ASSERT(cond)
Definition: assert.h:321
const ICData * ic_data() const
Definition: il.h:4716
const Function & tearoff_interface_target() const
Definition: il.h:4727
const Function & interface_target() const
Definition: il.h:4726
Token::Kind token_kind() const
Definition: il.h:4725
const String & function_name() const
Definition: il.h:4724
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
TemplateDartCall(intptr_t deopt_id, intptr_t type_args_len, const Array &argument_names, InputsArray &&inputs, const InstructionSource &source)
Definition: il.h:4550
static bool IsTypeTestOperator(Kind tok)
Definition: token.h:244
static bool IsTypeCastOperator(Kind tok)
Definition: token.h:248
static bool IsIndexOperator(Kind tok)
Definition: token.h:250
static bool IsRelationalOperator(Kind tok)
Definition: token.h:232
static bool IsBinaryOperator(Token::Kind token)
Definition: token.cc:31
static bool IsEqualityOperator(Kind tok)
Definition: token.h:236
static bool IsUnaryOperator(Token::Kind token)
Definition: token.cc:41
intptr_t InputCount() const
Definition: il.h:2794
#define ASSERT(E)

Member Function Documentation

◆ ArgumentsSize()

intptr_t dart::InstanceCallBaseInstr::ArgumentsSize ( ) const
virtual

Reimplemented from dart::TemplateDartCall< 0 >.

Definition at line 5211 of file il.cc.

5211 {
5212 if (interface_target().IsNull()) {
5213 return ArgumentCountWithoutTypeArgs() + ((type_args_len() > 0) ? 1 : 0);
5214 }
5215
5218 ((type_args_len() > 0) ? 1 : 0);
5219}
static intptr_t ComputeArgumentsSizeInWords(const Function &function, intptr_t arguments_count)
Definition: flow_graph.cc:96
intptr_t ArgumentCountWithoutTypeArgs() const
Definition: il.h:4578
DART_EXPORT bool IsNull(Dart_Handle object)

◆ CanBecomeDeoptimizationTarget()

virtual bool dart::InstanceCallBaseInstr::CanBecomeDeoptimizationTarget ( ) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 4736 of file il.h.

4736 {
4737 // Instance calls that are specialized by the optimizer need a
4738 // deoptimization descriptor before the call.
4739 return true;
4740 }

◆ CanReceiverBeSmiBasedOnInterfaceTarget()

bool dart::InstanceCallBaseInstr::CanReceiverBeSmiBasedOnInterfaceTarget ( Zone zone) const

Definition at line 5182 of file il.cc.

5183 {
5184 if (!interface_target().IsNull()) {
5185 // Note: target_type is fully instantiated rare type (all type parameters
5186 // are replaced with dynamic) so checking if Smi is assignable to
5187 // it would compute correctly whether or not receiver can be a smi.
5188 const AbstractType& target_type = AbstractType::Handle(
5189 zone, Class::Handle(zone, interface_target().Owner()).RareType());
5190 if (!CompileType::Smi().IsAssignableTo(target_type)) {
5191 return false;
5192 }
5193 }
5194 // In all other cases conservatively assume that the receiver can be a smi.
5195 return true;
5196}
static CompileType Smi()
static Object & Handle()
Definition: object.h:407

◆ ComputeType()

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

Reimplemented from dart::Definition.

Reimplemented in dart::PolymorphicInstanceCallInstr.

Definition at line 1449 of file type_propagator.cc.

1449 {
1450 // TODO(alexmarkov): calculate type of InstanceCallInstr eagerly
1451 // (in optimized mode) and avoid keeping separate result_type.
1452 CompileType* inferred_type = result_type();
1453 intptr_t inferred_cid = kDynamicCid;
1454 bool is_nullable = CompileType::kCanBeNull;
1455 if (inferred_type != nullptr) {
1456 if (inferred_type->IsNullableInt()) {
1457 TraceStrongModeType(this, inferred_type);
1458 return *inferred_type;
1459 }
1460 inferred_cid = inferred_type->ToNullableCid();
1461 is_nullable = inferred_type->is_nullable();
1462 }
1463
1464 // Include special cases of type inference for int operations.
1465 // This helps if both type feedback and results of TFA
1466 // are not available (e.g. in AOT unit tests).
1467 switch (token_kind()) {
1468 case Token::kADD:
1469 case Token::kSUB:
1470 case Token::kMUL:
1471 case Token::kMOD:
1472 if ((ArgumentCount() == 2) &&
1473 ArgumentValueAt(0)->Type()->IsNullableInt() &&
1474 ArgumentValueAt(1)->Type()->IsNullableInt()) {
1475 return CompileType::Int();
1476 }
1477 break;
1478 case Token::kNEGATE:
1479 if ((ArgumentCount() == 1) &&
1480 ArgumentValueAt(0)->Type()->IsNullableInt()) {
1481 return CompileType::Int();
1482 }
1483 break;
1484 default:
1485 break;
1486 }
1487
1488 const Function& target = interface_target();
1489 if (!target.IsNull()) {
1490 const AbstractType& result_type =
1491 AbstractType::ZoneHandle(target.result_type());
1492 // Currently VM doesn't have enough information to instantiate generic
1493 // result types of interface targets:
1494 // 1. receiver type inferred by the front-end is not passed to VM.
1495 // 2. VM collects type arguments through the chain of superclasses but
1496 // not through implemented interfaces.
1497 // TODO(dartbug.com/30480): instantiate generic result_type
1498 CompileType result(is_nullable && !result_type.IsStrictlyNonNullable(),
1500 inferred_cid == kDynamicCid ? kIllegalCid : inferred_cid,
1501 &result_type);
1503 return result;
1504 }
1505
1506 if (inferred_type != nullptr) {
1507 TraceStrongModeType(this, inferred_type);
1508 return *inferred_type;
1509 }
1510
1511 return CompileType::Dynamic();
1512}
static constexpr bool kCannotBeSentinel
Definition: compile_type.h:49
static CompileType Int()
static constexpr bool kCanBeNull
Definition: compile_type.h:45
static CompileType Dynamic()
CompileType * Type()
Definition: il.h:2521
CompileType * result_type() const
Definition: il.h:4748
Value * ArgumentValueAt(intptr_t index) const
Definition: il.h:3435
static Object & ZoneHandle()
Definition: object.h:419
intptr_t ArgumentCount() const
Definition: il.h:4586
GAsyncResult * result
uint32_t * target
@ kIllegalCid
Definition: class_id.h:214
@ kDynamicCid
Definition: class_id.h:253
static void TraceStrongModeType(const Instruction *instr, const AbstractType &type)

◆ DECLARE_ABSTRACT_INSTRUCTION()

dart::InstanceCallBaseInstr::DECLARE_ABSTRACT_INSTRUCTION ( InstanceCallBase  )

◆ DeoptimizationTarget()

virtual intptr_t dart::InstanceCallBaseInstr::DeoptimizationTarget ( ) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 4792 of file il.h.

4792{ return DeoptId::kNone; }
static constexpr intptr_t kNone
Definition: deopt_id.h:27

◆ entry_kind()

Code::EntryKind dart::InstanceCallBaseInstr::entry_kind ( ) const
inline

Definition at line 4759 of file il.h.

4759{ return entry_kind_; }

◆ function_name()

const String & dart::InstanceCallBaseInstr::function_name ( ) const
inline

Definition at line 4724 of file il.h.

4724{ return function_name_; }

◆ has_unique_selector()

bool dart::InstanceCallBaseInstr::has_unique_selector ( ) const
inline

Definition at line 4731 of file il.h.

4731{ return has_unique_selector_; }

◆ HasICData()

bool dart::InstanceCallBaseInstr::HasICData ( ) const
inline

Definition at line 4717 of file il.h.

4717 {
4718 return (ic_data() != nullptr) && !ic_data()->IsNull();
4719 }
bool IsNull() const
Definition: object.h:363

◆ HasUnknownSideEffects()

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

Implements dart::Instruction.

Definition at line 4742 of file il.h.

4742{ return true; }

◆ ic_data()

const ICData * dart::InstanceCallBaseInstr::ic_data ( ) const
inline

Definition at line 4716 of file il.h.

4716{ return ic_data_; }

◆ interface_target()

const Function & dart::InstanceCallBaseInstr::interface_target ( ) const
inline

Definition at line 4726 of file il.h.

4726{ return interface_target_; }

◆ is_call_on_this()

bool dart::InstanceCallBaseInstr::is_call_on_this ( ) const
inline

Definition at line 4763 of file il.h.

4763{ return is_call_on_this_; }

◆ mark_as_call_on_this()

void dart::InstanceCallBaseInstr::mark_as_call_on_this ( )
inline

Definition at line 4762 of file il.h.

4762{ is_call_on_this_ = true; }

◆ receiver_is_not_smi()

bool dart::InstanceCallBaseInstr::receiver_is_not_smi ( ) const
inline

Definition at line 4767 of file il.h.

4767{ return receiver_is_not_smi_; }

◆ representation()

Representation dart::InstanceCallBaseInstr::representation ( ) const
virtual

Reimplemented from dart::Instruction.

Definition at line 5221 of file il.cc.

5221 {
5223}
static Representation ReturnRepresentationOf(const Function &function)
Definition: flow_graph.cc:125

◆ RequiredInputRepresentation()

Representation dart::InstanceCallBaseInstr::RequiredInputRepresentation ( intptr_t  idx) const
virtual

Reimplemented from dart::Instruction.

Definition at line 5198 of file il.cc.

5199 {
5200 // The first input is the array of types
5201 // for generic functions
5202 if (type_args_len() > 0) {
5203 if (idx == 0) {
5204 return kTagged;
5205 }
5206 idx--;
5207 }
5209}
static Representation ParameterRepresentationAt(const Function &function, intptr_t index)
Definition: flow_graph.cc:109

◆ ResolveForReceiverClass()

FunctionPtr dart::InstanceCallBaseInstr::ResolveForReceiverClass ( const Class cls,
bool  allow_add = true 
)

Definition at line 5336 of file il.cc.

5338 {
5339 const Array& args_desc_array = Array::Handle(GetArgumentsDescriptor());
5340 ArgumentsDescriptor args_desc(args_desc_array);
5342 args_desc, allow_add);
5343}
static FunctionPtr ResolveDynamicForReceiverClass(const Class &receiver_class, const String &function_name, const ArgumentsDescriptor &args_desc, bool allow_add)
Definition: resolver.cc:148
ArrayPtr GetArgumentsDescriptor() const
Definition: il.h:4617

◆ result_cid()

intptr_t dart::InstanceCallBaseInstr::result_cid ( ) const
inline

Definition at line 4750 of file il.h.

4750 {
4751 if (result_type_ == nullptr) {
4752 return kDynamicCid;
4753 }
4754 return result_type_->ToCid();
4755 }

◆ result_type()

CompileType * dart::InstanceCallBaseInstr::result_type ( ) const
inline

Definition at line 4748 of file il.h.

4748{ return result_type_; }

◆ set_entry_kind()

void dart::InstanceCallBaseInstr::set_entry_kind ( Code::EntryKind  value)
inline

Definition at line 4760 of file il.h.

4760{ entry_kind_ = value; }
uint8_t value

◆ set_has_unique_selector()

void dart::InstanceCallBaseInstr::set_has_unique_selector ( bool  b)
inline

Definition at line 4732 of file il.h.

4732{ has_unique_selector_ = b; }
static bool b

◆ set_ic_data() [1/2]

void dart::InstanceCallBaseInstr::set_ic_data ( const ICData value)
inline

Definition at line 4722 of file il.h.

4722{ ic_data_ = value; }

◆ set_ic_data() [2/2]

DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(InstanceCallBaseInstr, TemplateDartCall, FIELD_LIST) protected void dart::InstanceCallBaseInstr::set_ic_data ( ICData value)
inline

Definition at line 4817 of file il.h.

4817{ ic_data_ = value; }

◆ set_receiver_is_not_smi()

void dart::InstanceCallBaseInstr::set_receiver_is_not_smi ( bool  value)
inline

Definition at line 4768 of file il.h.

4768{ receiver_is_not_smi_ = value; }

◆ set_result_type()

void dart::InstanceCallBaseInstr::set_result_type ( CompileType result_type)
inline

Definition at line 4818 of file il.h.

4818{ result_type_ = result_type; }

◆ SetResultType()

void dart::InstanceCallBaseInstr::SetResultType ( Zone zone,
CompileType  new_type 
)
inline

Definition at line 4744 of file il.h.

4744 {
4745 result_type_ = new (zone) CompileType(new_type);
4746 }

◆ SpeculativeModeOfInput()

virtual SpeculativeMode dart::InstanceCallBaseInstr::SpeculativeModeOfInput ( intptr_t  idx) const
inlinevirtual

Reimplemented from dart::Instruction.

Definition at line 4776 of file il.h.

4776 {
4777 if (type_args_len() > 0) {
4778 if (idx == 0) {
4779 return kGuardInputs;
4780 }
4781 idx--;
4782 }
4783 if (interface_target_.IsNull()) return kGuardInputs;
4784 return interface_target_.is_unboxed_parameter_at(idx) ? kNotSpeculative
4785 : kGuardInputs;
4786 }
@ kGuardInputs
Definition: il.h:972
@ kNotSpeculative
Definition: il.h:975

◆ tearoff_interface_target()

const Function & dart::InstanceCallBaseInstr::tearoff_interface_target ( ) const
inline

Definition at line 4727 of file il.h.

4727 {
4728 return tearoff_interface_target_;
4729 }

◆ token_kind()

Token::Kind dart::InstanceCallBaseInstr::token_kind ( ) const
inline

Definition at line 4725 of file il.h.

4725{ return token_kind_; }

◆ UpdateReceiverSminess()

void dart::InstanceCallBaseInstr::UpdateReceiverSminess ( Zone zone)

Definition at line 5225 of file il.cc.

5225 {
5226 if (CompilerState::Current().is_aot() && !receiver_is_not_smi()) {
5227 if (!Receiver()->Type()->CanBeSmi() ||
5230 }
5231 }
5232}
static CompilerState & Current()
bool CanReceiverBeSmiBasedOnInterfaceTarget(Zone *zone) const
Definition: il.cc:5182
void set_receiver_is_not_smi(bool value)
Definition: il.h:4768
bool receiver_is_not_smi() const
Definition: il.h:4767
Value * Receiver() const
Definition: il.h:4577

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