7684ae57db
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>