(&mut self, inputs: Vec<PortIdx>, outputs: Vec<PortIdx>, r: &mut Region)
| 323 | } |
| 324 | |
| 325 | fn ports_callback(&mut self, inputs: Vec<PortIdx>, outputs: Vec<PortIdx>, r: &mut Region) { |
| 326 | // set the block port as a state edge, of the block itself |
| 327 | let port = outputs[0]; |
| 328 | let new_state = r.states.len(); |
| 329 | r.states.push(State { |
| 330 | name: format!("bb{}", new_state), |
| 331 | variant: StateVariant::Block(NodeIdx::new(0)), // this gets filled in by Region::observe_state_edges |
| 332 | producers: vec![], |
| 333 | }); |
| 334 | |
| 335 | r.constrain(port, Storage::Immaterial(Some(new_state.try_into().unwrap()))); |
| 336 | r.ports[port].set_variant(EdgeVariant::State); |
| 337 | } |
| 338 | |
| 339 | fn codegen(&self, token: &NodeOwner, inputs: Vec<PortIdx>, outputs: Vec<PortIdx>, r: &mut Region, ir: &mut IR, ops: &mut Assembler) { |
| 340 | // block entries don't codegen to anything |
no test coverage detected