Files
Daco Harkes 295f0b1e23 [record_use] Fix dart2js crash
If uses are not being recorded, don't perform any work in the compiler.

TEST=manually tested that the compiler doesn't crash anymore

If uses are being recorded, keep the source information. (This could
be costly for memory. We should consider introducing a more involved
`RecordUseSourceInformationStrategy`, but that will add complexity.)

TEST=pkg/compiler/test/record_use/record_use_test.dart

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

Change-Id: Ib93a8a85a9b4d7c64cae7e8ac306ff4df0145db8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/493403
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2026-04-08 13:52:40 -07:00
..
2026-03-25 01:48:37 -07:00