Get all modifies targets, as instantiated struct ids.
(&self)
| 322 | |
| 323 | /// Get all modifies targets, as instantiated struct ids. |
| 324 | pub fn get_modify_ids(&self) -> BTreeSet<QualifiedInstId<StructId>> { |
| 325 | self.data |
| 326 | .modify_targets |
| 327 | .iter() |
| 328 | .map(|(qid, exps)| { |
| 329 | exps.iter().map(move |e| { |
| 330 | let env = self.global_env(); |
| 331 | let rty = &env.get_node_instantiation(e.node_id())[0]; |
| 332 | let (_, _, inst) = rty.require_struct(); |
| 333 | qid.instantiate(inst.to_owned()) |
| 334 | }) |
| 335 | }) |
| 336 | .flatten() |
| 337 | .collect() |
| 338 | } |
| 339 | |
| 340 | pub fn get_modify_ids_and_exps(&self) -> BTreeMap<QualifiedInstId<StructId>, Vec<&Exp>> { |
| 341 | // TODO: for now we compute this from the legacy representation, but if this |