1195 {
1196
1197
1198
1199
1200
1201
1202 GraphEntryInstr* graph_entry = block_->AsGraphEntry();
1203 if (graph_entry == nullptr) {
1204 if (auto function_entry = block_->AsFunctionEntry()) {
1205 graph_entry = function_entry->graph_entry();
1206 } else if (auto osr_entry = block_->AsOsrEntry()) {
1207 graph_entry = osr_entry->graph_entry();
1208 } else if (auto catch_entry = block_->AsCatchBlockEntry()) {
1209 graph_entry = catch_entry->graph_entry();
1210 } else {
1212 }
1213 }
1214
1215
1216
1217
1218
1219 if (graph_entry->IsCompiledForOsr()) {
1220
1222 }
1223
1224 const ParsedFunction& pf = graph_entry->parsed_function();
1225 const Function&
function = pf.function();
1226 if (
function.IsIrregexpFunction()) {
1227
1228
1229
1230 switch (env_index()) {
1237 default:
1239 }
1242 }
1243
1245 if (param_index >= 0) {
1246
1249 const AbstractType&
type = pf.RawParameterVariable(0)->static_type();
1250 if (
type.IsObjectType() ||
type.IsNullType()) {
1251
1254 }
1255
1256
1258
1263 if (type_class.IsPrivate()) {
1264
1265 cid = type_class.id();
1266 } else {
1267 if (FLAG_use_cha_deopt ||
1268 thread->isolate_group()->all_classes_finalized()) {
1269 if (FLAG_trace_cha) {
1271 " **(CHA) Computing exact type of receiver, "
1272 "no subclasses: %s\n",
1273 type_class.ToCString());
1274 }
1275 if (FLAG_use_cha_deopt) {
1276 thread->compiler_state()
1277 .cha()
1278 .AddToGuardedClassesForSubclassCount(type_class,
1279 0);
1280 }
1281 cid = type_class.id();
1282 }
1283 }
1284 }
1285 }
1286
1289 }
1290
1291 const bool is_unchecked_entry_param =
1292 graph_entry->unchecked_entry() == block_;
1293
1294 const LocalVariable* param = (pf.scope() != nullptr)
1297 ASSERT(param !=
nullptr);
1298
1299 CompileType* inferred_type = nullptr;
1301 bool inferred_nullable = true;
1302 if (!block_->IsCatchBlockEntry()) {
1303 inferred_type = param->inferred_arg_type();
1304
1305 if (inferred_type != nullptr) {
1306
1307 if (inferred_type->IsNullableInt()) {
1309 return *inferred_type;
1310 }
1311
1312 inferred_cid = inferred_type->ToNullableCid();
1313 inferred_nullable = inferred_type->is_nullable();
1314 }
1315 }
1316
1317
1318
1319
1320
1321 if ((
function.name() != Symbols::EqualOperator().ptr()) &&
1322 (param->was_type_checked_by_caller() ||
1323 (is_unchecked_entry_param &&
1324 !param->is_explicit_covariant_parameter()))) {
1325 const AbstractType& static_type = param->static_type();
1327 inferred_nullable && !static_type.IsStrictlyNonNullable(),
1328 block_->IsCatchBlockEntry() && param->is_late(),
1330 &static_type);
1333 }
1334
1335 if (inferred_type != nullptr) {
1337 return *inferred_type;
1338 }
1339 }
1340
1341 if (block_->IsCatchBlockEntry()) {
1342
1344 }
1345
1347}
static bool HasSubclasses(const Class &cls)
static CompileType FromCid(intptr_t cid)
static constexpr bool kCannotBeSentinel
static CompileType DynamicOrSentinel()
static constexpr bool kCannotBeNull
static constexpr bool kCanBeNull
static CompileType Dynamic()
static Thread * Current()
#define THR_Print(format,...)
Dart_NativeFunction function
static void TraceStrongModeType(const Instruction *instr, const AbstractType &type)