Files
sdk/pkg/vm/lib/transformations
Alexander Markov e7c8363900 [dart2wasm/tfa] Improve inference for binary int operations
Because of the special language rules (int +/-/* int = int),
static type for binary int operations can be more precise than
inferred result type (in case of dart2wasm, int binary operations
are declared as external methods returning num).

So, for dart2wasm it is useful to narrow result of a call by its
static type, if it is different from return type of the call target.

Also, this change fixes an incorrect static type which is
created during dart2wasm async* transformation.

TEST=pkg/vm/testcases/transformations/type_flow/transformer/int_operations_dart2wasm.dart
Fixes https://github.com/dart-lang/sdk/issues/53921

Change-Id: Id6a5a2cffac47918c4e92f996267bf7fae713416
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333580
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-11-03 13:39:43 +00:00
..