You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flambda-backend: Don't add a module to the environment when saving it (#1667)
When saving a .cmi, we produce all the same data we would if we were importing
it and add this data to the environment. This is done only so that the CRC for
the module is added to our CRCs and we can look up the CRC later. This is wholly
unnecessary, however: we can just add the CRC to the `Consistbl`. Removing the
extra steps
* gets rid of a decidedly awkward code path,
* keeps the environment clean (we currently never observe the fact that a
saved .cmi is treated as bound in the environment, but it's not good!), and
* will also enable further simplification, since `sign_of_cmi` now freshens
unconditionally (the only call with `~freshen:false` is gone).
This patch removes the saved .cmi from the persistent environment, and also
changes `crc_of_unit` to look up in the global `crc_units` table first so that
it bypasses `find_pers_struct` for a saved .cmi.
0 commit comments