Allocate a new dynamic type.
(&mut self, dt: DynamicType, data: DynamicTypeData, loc: Location)
| 295 | |
| 296 | // Allocate a new dynamic type. |
| 297 | fn add_dt(&mut self, dt: DynamicType, data: DynamicTypeData, loc: Location) -> ParseResult<()> { |
| 298 | self.map.def_dt(dt, loc)?; |
| 299 | while self.function.dfg.dynamic_types.next_key().index() <= dt.index() { |
| 300 | self.function.dfg.make_dynamic_ty(DynamicTypeData::new( |
| 301 | data.base_vector_ty, |
| 302 | data.dynamic_scale, |
| 303 | )); |
| 304 | } |
| 305 | self.function.dfg.dynamic_types[dt] = data; |
| 306 | Ok(()) |
| 307 | } |
| 308 | |
| 309 | // Allocate a global value slot. |
| 310 | fn add_gv(&mut self, gv: GlobalValue, data: GlobalValueData, loc: Location) -> ParseResult<()> { |
no test coverage detected