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 = !
target.is_polymorphic_target();
118 }
119 }
120
121 if (has_one_target) {
122 const Function&
target = targets.FirstTarget();
125 ReplaceWithStaticCall(instr,
target, targets.AggregateCallCount());
126 return;
127 }
128 }
129
130
131
132
133
134
135
136
137
138
139
140 if (has_one_target && FLAG_polymorphic_with_deopt &&
141 (!instr->ic_data()->HasDeoptReason(ICData::kDeoptCheckClass) ||
142 targets.length() <= FLAG_max_polymorphic_checks)) {
143
145
146
147 const Function&
target = targets.FirstTarget();
148 ReplaceWithStaticCall(instr,
target, targets.AggregateCallCount());
149 } else {
150 PolymorphicInstanceCallInstr*
call =
152 false);
154 }
155}
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)