Files
sdk/runtime
Alexander Markov 7684ae57db [vm,aot] Use inferred type arguments to remove type checks
When TFA is able to infer type arguments, write _exact type_ into
the inferred types metadata.

Use inferred exact type in the VM: load it from metadata and
attach to a field if necessary. CompileType is extended to hold
exact type if it is known.

In the instruction canonicalizer, if type arguments are loaded from
a value which has a known exact type, then replace this LoadField with
Constant type arguments from exact type.

This allows VM to use inferred type arguments to remove parameter
type checks.

TEST=runtime/tests/vm/dart/eliminate_type_check_using_exact_type_il_test.dart

Closes https://github.com/dart-lang/sdk/issues/61083

Change-Id: I766c5e8c49be406f3e12d38e8d966e5813500c4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/440064
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2025-07-15 10:29:12 -07:00
..
2025-07-11 09:41:22 -07:00
2025-06-23 21:08:19 -07:00
2025-07-15 07:50:01 -07:00