Files
sdk/pkg/vm/lib/transformations
Alexander Markov 632a8baac5 [vm] Avoid altering static types when removing redundant type casts
VM can use static type of receiver in order to omit parameter
type checks. Removing a redundant AsExpression node can incorrectly
change static type of a receiver and break parameter type checks.

So, instead of removing redundant AsExpression nodes they are now
marked as Unchecked. This turns them into a no-op when building
flow graph, but keeps static type unchanged.

TEST=runtime/tests/vm/dart/regress_53945a_test.dart
Fixes https://github.com/dart-lang/sdk/issues/53945

Change-Id: Ic283158c9b7ba11cb5c140226a6d057e98c8ce77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351621
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-02-12 17:54:32 +00:00
..
2024-02-09 21:27:29 +00:00