edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
| 1 | //! Gate-counter bumps, compiled out when the `gate-counters` feature is off. |
| 2 | //! |
| 3 | //! The ~550 `*_HITS` thread-locals in this crate exist only so the test gates |
| 4 | //! (and the probe's census print) can prove a coding path fired; every bump is |
| 5 | //! a TLS access plus a `Cell` read-modify-write on the parse thread. Routing |
| 6 | //! all of them through [`hit!`]/[`hit_do!`] lets a shipped decoder drop them |
| 7 | //! (`--no-default-features`) while the accessors keep compiling and returning |
| 8 | //! whatever the counters hold (0 when the feature is off), so no caller needs |
| 9 | //! a `cfg`. |
| 10 | |
| 11 | /// Bumps counter `$name` by one -- nothing at all without `gate-counters`. |
| 12 | /// Usable in expression position (it evaluates to `()`). |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | /// Same, for a bump that is not a plain `+= 1` (array/tuple buckets, the |
| 26 | /// `inter_last_mc` stamp, the counter-only scan loops): the whole statement |
| 27 | /// list disappears without `gate-counters`. |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | // Without the feature the statements stay type-checked but unreachable, so the |
| 36 | // values they read (bucket indices, filter kinds) still count as used and the |
| 37 | // optimiser drops the whole branch. |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | pub use ; |