4138 {
4140 targets.CreateHelper(zone, ic_data);
4141
4142 if (targets.is_empty() || targets.IsMonomorphic()) {
4143 return &targets;
4144 }
4145
4147
4148 Array& args_desc_array =
Array::Handle(zone, ic_data.arguments_descriptor());
4149 ArgumentsDescriptor args_desc(args_desc_array);
4151
4153
4154 intptr_t
length = targets.length();
4155
4156
4157
4158
4159
4160
4161
4162
4163 for (
int idx = 0; idx <
length; idx++) {
4164 int lower_limit_cid = (idx == 0) ? -1 : targets[idx - 1].cid_end;
4165 auto target_info = targets.TargetAt(idx);
4166 const Function&
target = *target_info->target;
4167 if (
target.is_polymorphic_target())
continue;
4168 for (
int i = target_info->cid_start - 1;
i > lower_limit_cid;
i--) {
4169 bool class_is_abstract = false;
4171 &class_is_abstract) &&
4172 fn.ptr() ==
target.ptr()) {
4173 if (!class_is_abstract) {
4174 target_info->cid_start =
i;
4176 }
4177 } else {
4178 break;
4179 }
4180 }
4181 }
4182
4183
4184
4186 for (
int idx = 0; idx <
length; idx++) {
4187 int upper_limit_cid =
4188 (idx ==
length - 1) ? max_cid : targets[idx + 1].cid_start;
4189 auto target_info = targets.TargetAt(idx);
4190 const Function&
target = *target_info->target;
4191 if (
target.is_polymorphic_target())
continue;
4192
4193
4194
4195
4196
4197 intptr_t cid_end_including_abstract = target_info->cid_end;
4198 for (
int i = target_info->cid_end + 1;
i < upper_limit_cid;
i++) {
4199 bool class_is_abstract = false;
4201 &class_is_abstract) &&
4202 fn.ptr() ==
target.ptr()) {
4203 cid_end_including_abstract =
i;
4204 if (!class_is_abstract) {
4205 target_info->cid_end =
i;
4207 }
4208 } else {
4209 break;
4210 }
4211 }
4212
4213
4214
4215
4216 if ((cid_end_including_abstract > target_info->cid_end) &&
4218 ((cid_end_including_abstract + 1) == targets[idx + 1].cid_start) &&
4219 (
target.ptr() == targets.TargetAt(idx + 1)->target->ptr())) {
4220 target_info->cid_end = cid_end_including_abstract;
4222 }
4223 }
4224 targets.MergeIntoRanges();
4225 return &targets;
4226}
static bool LookupMethodFor(int class_id, const String &name, const ArgumentsDescriptor &args_desc, Function *fn_return, bool *class_is_abstract_return=nullptr)
static IsolateGroup * Current()
ClassTable * class_table() const
static StaticTypeExactnessState NotTracking()