Description
The compiler might duplicate code by inlining, this should then either (1) result in a call with two loading units, or (2) two identical calls with one loading unit.
A developer might write code that uses exactly the same const instance from two loading units. This should either lead to (1) two const instances being recorded with both a single loading unit or (2) a single const instance being recorded with multiple loading units.
(Assets output from a link hook should have a list of loading units as well, multiple calls can contribute to 1 asset. As long as we don't give access to the loading unit graph in the link hook, the link hook will need to output all loading units an asset is used in. And then the SDK can decide to put the asset in the dominating loading unit; or in the leaves if asset loading is deduplicated in that SDK.)
cc @biggs0125
- record-use format
- dart compiler emitting multiple loading units
- integration tests for multiple loading units in Dart SDK
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
[record_use] Remove definition loading unit (#3061)
[record_use] Remove definition loading unit (dart-lang#3061)
[record_use] Remove definition loading unit (dart-lang#3061)
[record_use] `LoadingUnit` Dart API (#3123)
dcharkes commentedon Feb 27, 2026
The JSONs are now a list in the format.
Squashed commit of the following: