carbon-lang icon indicating copy to clipboard operation
carbon-lang copied to clipboard

Lazily lower entities rather than iterating over all entities in SemIR

Open dwblaikie opened this issue 9 months ago • 1 comments

Description of the bug:

We currently emit function forward declarations for totally unused/unreferenced function forward declarations. This is unnecessary & we should avoid doing it, by having function and other entities emitted lazily - starting at the definitions, emitting declarations for anything those definitions call. Some of this is already implemented for emitting specialized generics and could be generalized further to handle the non-generic cases lazily as well.

(this was originally discovered with a crash on code like this: class C; fn F(c: C); where C has not been completed, has no value representation and lowering crashes expecting there to be one - this case may be fixed in other ways, though)

Discussed on discord starting here: https://discord.com/channels/655572317891461132/655578254970716160/1344750580840529982

dwblaikie avatar Feb 27 '25 21:02 dwblaikie

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please comment or remove the inactive label. The long term issue label can also be added for issues which are expected to take time.

This issue is labeled inactive because the last activity was over 90 days ago.

github-actions[bot] avatar May 29 '25 02:05 github-actions[bot]