Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Add [Clambda.usymbol_provenance] #2088
This pull request adds a new type and two record fields to be used for the tracking of provenance information for symbols, such that they can be referenced (e.g. for printing) by their proper module paths. In my previous working branch these were not filled in for Closure mode but I have sketched an implementation here, which I shall test in due course. The Flambda patch which @chambart is working on fills these fields in properly for Flambda.
The DWARF emitter reads directly from the Clambda constant definition structures, which is why the provenances are not transmitted further. (In the future, particularly with the plan for Flambda to bypass Clambda entirely, we will probably have to change this.)
As far as I understand, the non-flambda pass never generates symbols for named constructions: there is the global module, and the constants lifted to symbols during Cmm conversion.