pub fn lower_event_subscriber_shapes_ir(
program: &CheckedProgram,
) -> HashMap<String, EventSubscriberShape>Expand description
P6.47 (design/tracks/the-ir.md §6b): every from Events(E) service in
program’s own unit, captured as an bynk_ir::EventSubscriberShape
keyed by service name — see that struct’s own doc comment for why this is
captured now rather than re-derived cross-unit at compose time. Absorbs
the ServiceProtocol::Events pre-filter this function’s own single call
site used to apply externally: lower_service_item_ir unconditionally
lowers every handler’s own body (not just its declared shape), so the
guard stays first here too — a cheap, structural pre-filter (which
services even have a shape to capture), not a resurrected raw-AST read
— before paying for a full lowering pass on a matching service. Safe as
of #1254: a catch_unwind probe wrapping lower_service_item_ir across
the entire e2e fixture corpus found zero panics, down from ~51 when the
P6.23 investigation first ran.