Description
Testing whether the compiler outputs the correct expected code exists today within the analyzer, CFE, and dart2js. You can look at some of the specific test runners here:
analyzer - pkg/analyzer/test/id_tests
CFE - pkg/front_end/test/id_tests
dart2js - pkg/compiler/test/equivalence
and the tests actually being run:
analyzer and CFE - pkg/_fe_analyzer_shared/test/constants/data/list.dart
dart2js - pkg/compiler/test/codegen/data/array_add.dart
A lot of the infrastructure is shared between CFE and analyzer, whereas dart2js implements much of its own. DDC can leverage much of what already exists with the CFE and analyzer in order to create codegen tests. There are a few uses cases with performance that this would be useful for e.g. js_util optimizations.
I dug into this earlier this year a bit, but have not created a fully working implementation yet. This bug is just to track this effort.
cc @nshahan