1194 {
1195
1196
1197
1198
1199
1200
1201 GraphEntryInstr* graph_entry = block_->AsGraphEntry();
1202 if (graph_entry == nullptr) {
1203 if (auto function_entry = block_->AsFunctionEntry()) {
1204 graph_entry = function_entry->graph_entry();
1205 } else if (auto osr_entry = block_->AsOsrEntry()) {
1206 graph_entry = osr_entry->graph_entry();
1207 } else if (auto catch_entry = block_->AsCatchBlockEntry()) {
1208 graph_entry = catch_entry->graph_entry();
1209 } else {
1211 }
1212 }
1213
1214
1215
1216
1217
1218 if (graph_entry->IsCompiledForOsr()) {
1219
1221 }
1222
1223 const ParsedFunction& pf = graph_entry->parsed_function();
1224 const Function&
function = pf.function();
1225 if (
function.IsIrregexpFunction()) {
1226
1227
1228
1229 switch (env_index()) {
1236 default:
1238 }
1241 }
1242
1244 if (param_index >= 0) {
1245
1248 const AbstractType&
type = pf.RawParameterVariable(0)->static_type();
1249 if (
type.IsObjectType() ||
type.IsNullType()) {
1250
1253 }
1254
1255
1257
1262 if (type_class.IsPrivate()) {
1263
1264 cid = type_class.id();
1265 } else {
1266 if (FLAG_use_cha_deopt ||
1267 thread->isolate_group()->all_classes_finalized()) {
1268 if (FLAG_trace_cha) {
1270 " **(CHA) Computing exact type of receiver, "
1271 "no subclasses: %s\n",
1272 type_class.ToCString());
1273 }
1274 if (FLAG_use_cha_deopt) {
1275 thread->compiler_state()
1276 .cha()
1277 .AddToGuardedClassesForSubclassCount(type_class,
1278 0);
1279 }
1280 cid = type_class.id();
1281 }
1282 }
1283 }
1284 }
1285
1288 }
1289
1290 const bool is_unchecked_entry_param =
1291 graph_entry->unchecked_entry() == block_;
1292
1293 const LocalVariable* param = (pf.scope() != nullptr)
1296 ASSERT(param !=
nullptr);
1297
1298 CompileType* inferred_type = nullptr;
1300 bool inferred_nullable = true;
1301 if (!block_->IsCatchBlockEntry()) {
1302 inferred_type = param->inferred_arg_type();
1303
1304 if (inferred_type != nullptr) {
1305
1306 if (inferred_type->IsNullableInt()) {
1308 return *inferred_type;
1309 }
1310
1311 inferred_cid = inferred_type->ToNullableCid();
1312 inferred_nullable = inferred_type->is_nullable();
1313 }
1314 }
1315
1316
1317
1318
1319
1320 if ((
function.name() != Symbols::EqualOperator().ptr()) &&
1321 (param->was_type_checked_by_caller() ||
1322 (is_unchecked_entry_param &&
1323 !param->is_explicit_covariant_parameter()))) {
1324 const AbstractType& static_type = param->static_type();
1326 inferred_nullable && !static_type.IsStrictlyNonNullable(),
1327 block_->IsCatchBlockEntry() && param->is_late(),
1329 &static_type);
1332 }
1333
1334 if (inferred_type != nullptr) {
1336 return *inferred_type;
1337 }
1338 }
1339
1340 if (block_->IsCatchBlockEntry()) {
1341
1343 }
1344
1346}
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)