()
| 85 | |
| 86 | impl IR { |
| 87 | pub fn new() -> Self { |
| 88 | let mut r = Region::new(); |
| 89 | r.live = true; |
| 90 | let mut r_map = StableGraph::new(); |
| 91 | let r_x = r_map.add_node(r); |
| 92 | Self { |
| 93 | body: None, |
| 94 | regions: r_map, |
| 95 | master_region: r_x, |
| 96 | owner: Some(NodeOwner::new()), |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | /// Create a region in this IR instance at the top-most level. |
| 101 | pub fn new_region<ABI: Abi + 'static>(&mut self, abi: Option<ABI>) -> RegionIdx { |