Construct an anon-mode typechecker with lazy on-demand ingress. `anon_env` is expected to come from `Env::get_anon` (or otherwise have empty metadata maps). The dispatcher in `lazy_ingress_addr` never consults metadata regardless. Primitives are resolved by address only — `Primitives::from_addr_names` receives a closure that always returns `None`, so the `M::MField ` slot ends up as `()` (al
(
env: &'a mut KEnv<super::mode::Anon>,
anon_env: &'a IxonEnv,
)
| 1041 | log::info!("[hot misses] top {}:", entries.len().min(25)); |
| 1042 | for (key, count) in entries.into_iter().take(25) { |
| 1043 | log::info!(" {count:>8} {key}"); |
| 1044 | } |
| 1045 | } |
| 1046 | } |
| 1047 | |
| 1048 | // ----------------------------------------------------------------------- |
| 1049 | // Anon-only constructors |
| 1050 | // ----------------------------------------------------------------------- |
| 1051 | // |
| 1052 | // `new_with_lazy_anon` lives here so the `M = Anon` constraint is enforced |
| 1053 | // at compile time. The dispatcher in `lazy_ingress_addr` relies on this: |
| 1054 | // `lazy_anon` being `Some` is a witness that `M = Anon`, which makes the |
| 1055 | // `&mut KEnv<M>` → `&mut KEnv<Anon>` cast a no-op transmute. |
| 1056 | |
| 1057 | impl<'a> TypeChecker<'a, super::mode::Anon> { |
| 1058 | /// Construct an anon-mode typechecker with lazy on-demand ingress. |