4141 {
4143 targets.CreateHelper(zone, ic_data);
4144
4145 if (targets.is_empty() || targets.IsMonomorphic()) {
4146 return &targets;
4147 }
4148
4150
4151 Array& args_desc_array =
Array::Handle(zone, ic_data.arguments_descriptor());
4152 ArgumentsDescriptor args_desc(args_desc_array);
4154
4156
4157 intptr_t
length = targets.length();
4158
4159
4160
4161
4162
4163
4164
4165
4166 for (
int idx = 0; idx <
length; idx++) {
4167 int lower_limit_cid = (idx == 0) ? -1 : targets[idx - 1].cid_end;
4168 auto target_info = targets.TargetAt(idx);
4169 const Function&
target = *target_info->target;
4170 if (
target.is_polymorphic_target())
continue;
4171 for (int i = target_info->cid_start - 1; i > lower_limit_cid; i--) {
4172 bool class_is_abstract = false;
4174 &class_is_abstract) &&
4175 fn.ptr() ==
target.ptr()) {
4176 if (!class_is_abstract) {
4177 target_info->cid_start = i;
4179 }
4180 } else {
4181 break;
4182 }
4183 }
4184 }
4185
4186
4187
4189 for (
int idx = 0; idx <
length; idx++) {
4190 int upper_limit_cid =
4191 (idx ==
length - 1) ? max_cid : targets[idx + 1].cid_start;
4192 auto target_info = targets.TargetAt(idx);
4193 const Function&
target = *target_info->target;
4194 if (
target.is_polymorphic_target())
continue;
4195
4196
4197
4198
4199
4200 intptr_t cid_end_including_abstract = target_info->cid_end;
4201 for (int i = target_info->cid_end + 1; i < upper_limit_cid; i++) {
4202 bool class_is_abstract = false;
4204 &class_is_abstract) &&
4205 fn.ptr() ==
target.ptr()) {
4206 cid_end_including_abstract = i;
4207 if (!class_is_abstract) {
4208 target_info->cid_end = i;
4210 }
4211 } else {
4212 break;
4213 }
4214 }
4215
4216
4217
4218
4219 if ((cid_end_including_abstract > target_info->cid_end) &&
4221 ((cid_end_including_abstract + 1) == targets[idx + 1].cid_start) &&
4222 (
target.ptr() == targets.TargetAt(idx + 1)->target->ptr())) {
4223 target_info->cid_end = cid_end_including_abstract;
4225 }
4226 }
4227 targets.MergeIntoRanges();
4228 return &targets;
4229}
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()