Open
Description
Currently we allocate a block def map for every block that contains item declarations or macro calls. This means a single body might have several block def maps. This separate tracking has the advantage of trivially enabling scopes to work correctly. But aside from that, we don't gain a lot for these separate allocations of blocks. They are always associated with a body (expression store, once we swap to that), so it would make sense to me to encode them more strictly into the body store alltogether. This would reduce the amount of queries and also allows making them more incremental by potentially getting rid of the BlockLoc
interning which currently contains unstable AstId
. cc #16176