The ingress-block address that owns `addr`: a projection (IPrj/CPrj/RPrj/ DPrj) maps to its Muts `block`; anything else is its own block. Used to map a resolved constant address to the `build_anon_work` item that covers it (standalone → itself; a mutual-block member → the whole block).
(env: &IxonEnv, addr: &Address)
| 306 | /// a resolved constant address to the `build_anon_work` item that covers it |
| 307 | /// (standalone → itself; a mutual-block member → the whole block). |
| 308 | pub fn block_of_addr(env: &IxonEnv, addr: &Address) -> Address { |
| 309 | use ixon::constant::ConstantInfo as CI; |
| 310 | match env.get_const(addr) { |
| 311 | Some(c) => match &c.info { |
| 312 | CI::IPrj(p) => p.block.clone(), |
| 313 | CI::CPrj(p) => p.block.clone(), |
| 314 | CI::RPrj(p) => p.block.clone(), |
| 315 | CI::DPrj(p) => p.block.clone(), |
| 316 | _ => addr.clone(), |
| 317 | }, |
| 318 | None => addr.clone(), |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | /// The ingress-block address of a work item's `primary` — the key for matching |
| 323 | /// a resolved target constant to the work item that covers it. |
no test coverage detected