67 {
68 const CallTargets& targets = instr->Targets();
69 if (targets.is_empty()) {
70 return;
71 }
72
74
75
78 return;
79 }
80
82 return;
83 }
84
87 return;
88 }
89
92 return;
93 }
96 return;
97 }
99 return;
100 }
102 return;
103 }
105 return;
106 }
107
108 bool has_one_target = targets.HasSingleTarget();
109 if (has_one_target) {
110
111
112 const Function&
target = targets.FirstTarget();
113 if (
target.recognized_kind() == MethodRecognizer::kObjectRuntimeType) {
116 } else {
117 has_one_target =
118 !
target.is_polymorphic_target() && !
target.IsDynamicallyOverridden();
119 }
120 }
121
122 if (has_one_target) {
123 const Function&
target = targets.FirstTarget();
126 ReplaceWithStaticCall(instr,
target, targets.AggregateCallCount());
127 return;
128 }
129 }
130
131
132
133
134
135
136
137
138
139
140
141 if (has_one_target && FLAG_polymorphic_with_deopt &&
142 (!instr->ic_data()->HasDeoptReason(ICData::kDeoptCheckClass) ||
143 targets.length() <= FLAG_max_polymorphic_checks)) {
144
146
147
148 const Function&
target = targets.FirstTarget();
149 ReplaceWithStaticCall(instr,
target, targets.AggregateCallCount());
150 } else {
151 PolymorphicInstanceCallInstr*
call =
153 false);
155 }
156}
void AddReceiverCheck(InstanceCallInstr *call)
bool TryReplaceWithEqualityOp(InstanceCallInstr *call, Token::Kind op_kind)
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)
ForwardInstructionIterator * current_iterator() const
static TypePtr ComputeRuntimeType(const CallTargets &targets)
static PolymorphicInstanceCallInstr * FromCall(Zone *zone, InstanceCallBaseInstr *call, const CallTargets &targets, bool complete)
static bool IsTypeTestOperator(Kind tok)
static bool IsRelationalOperator(Kind tok)
static bool IsBinaryOperator(Token::Kind token)
static bool IsUnaryOperator(Token::Kind token)