50 intptr_t call_count) {
58 call->set_entry_kind(Code::EntryKind::kUnchecked);
109 if (has_one_target) {
113 if (
target.recognized_kind() == MethodRecognizer::kObjectRuntimeType) {
118 !
target.is_polymorphic_target() && !
target.IsDynamicallyOverridden();
122 if (has_one_target) {
141 if (has_one_target && FLAG_polymorphic_with_deopt &&
143 targets.
length() <= FLAG_max_polymorphic_checks)) {
162void JitCallSpecializer::LowerContextAllocation(
165 Value* context_value) {
166 ASSERT(alloc->IsAllocateContext() || alloc->IsCloneContext());
175 Value* initial_value;
176 if (context_value !=
nullptr) {
179 Slot::Context_parent(), alloc->
source());
186 StoreFieldInstr*
store =
new (
Z) StoreFieldInstr(
187 Slot::Context_parent(),
new (
Z)
Value(replacement), initial_value,
190 cursor = replacement;
192 for (
auto& slot : context_variables) {
193 if (context_value !=
nullptr) {
194 LoadFieldInstr*
load =
new (
Z) LoadFieldInstr(
203 store =
new (
Z) StoreFieldInstr(
212 LowerContextAllocation(instr, instr->
context_slots(),
nullptr);
const ZoneGrowableArray< const Slot * > & context_slots() const
void AddReceiverCheck(InstanceCallInstr *call)
bool TryReplaceWithEqualityOp(InstanceCallInstr *call, Token::Kind op_kind)
FlowGraph * flow_graph() const
bool TryInlineInstanceSetter(InstanceCallInstr *call)
bool TryInlineInstanceGetter(InstanceCallInstr *call)
bool TryReplaceWithRelationalOp(InstanceCallInstr *call, Token::Kind op_kind)
bool TryReplaceWithUnaryOp(InstanceCallInstr *call, Token::Kind op_kind)
void ReplaceWithInstanceOf(InstanceCallInstr *instr)
bool TryReplaceWithBinaryOp(InstanceCallInstr *call, Token::Kind op_kind)
bool TryInlineInstanceMethod(InstanceCallInstr *call)
bool HasSingleTarget() const
intptr_t AggregateCallCount() const
const Function & FirstTarget() const
StaticTypeExactnessState MonomorphicExactness() const
intptr_t MonomorphicReceiverCid() const
bool IsMonomorphic() const
const ZoneGrowableArray< const Slot * > & context_slots() const
Value * context_value() const
void ReplaceWith(Definition *other, ForwardInstructionIterator *iterator)
ForwardInstructionIterator * current_iterator() const
void AddExactnessGuard(InstanceCallInstr *call, intptr_t receiver_cid)
ConstantInstr * constant_null() const
void InsertAfter(Instruction *prev, Instruction *instr, Environment *env, UseKind use_kind)
bool HasDeoptReason(ICData::DeoptReasonId reason) const
const ICData * ic_data() const
Token::Kind token_kind() const
const CallTargets & Targets()
InstructionSource source() const
intptr_t deopt_id() const
virtual void VisitInstanceCall(InstanceCallInstr *instr)
JitCallSpecializer(FlowGraph *flow_graph, SpeculativeInliningPolicy *speculative_policy)
virtual bool IsAllowedForInlining(intptr_t deopt_id) const
virtual void VisitCloneContext(CloneContextInstr *instr)
virtual bool TryOptimizeStaticCallUsingStaticTypes(StaticCallInstr *call)
virtual void VisitAllocateContext(AllocateContextInstr *instr)
static TypePtr ComputeRuntimeType(const CallTargets &targets)
static PolymorphicInstanceCallInstr * FromCall(Zone *zone, InstanceCallBaseInstr *call, const CallTargets &targets, bool complete)
static StaticCallInstr * FromCall(Zone *zone, const C *call, const Function &target, intptr_t call_count)
bool IsTriviallyExact() const
static bool IsTypeTestOperator(Kind tok)
static bool IsRelationalOperator(Kind tok)
static bool IsBinaryOperator(Token::Kind token)
static bool IsUnaryOperator(Token::Kind token)
Value * CopyWithType(Zone *zone)