Expand description
ID remapping for serialized analyzer fragments.
Global IDs aren’t reproducible across runs, so fragments store local
ones: counter IDs (TokenId/TextId) as per-file window offsets
(rebased on decode), interned IDs (StrId/PathId) as dictionary
indices (re-interned on decode). The ID types’ custom serde consults a
thread-local session; inactive means passthrough, and an out-of-window
ID errors out so the fragment is treated as non-cacheable.
Structs§
- Decode
Session - Encode
Dicts - Dictionaries produced by an encode session. Stored alongside the encoded payload and used to seed the decode session.
- Encode
Session - IdRebase
- Rebases decoded local IDs onto a freshly reserved counter range.
- IdWindow
- Half-open ID window
(start, end]matching the pre/post counter values around a single file’s parse + pass1.
Functions§
- begin_
decode - begin_
encode - end_
decode - end_
encode - Ends the encode session and returns the collected dictionaries.