MCPcopy Create free account
hub / github.com/diem/move / get_modify_ids

Method get_modify_ids

language/move-prover/bytecode/src/function_target.rs:324–338  ·  view source on GitHub ↗

Get all modifies targets, as instantiated struct ids.

(&self)

Source from the content-addressed store, hash-verified

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

Callers 2

Calls 9

flattenMethod · 0.80
node_idMethod · 0.80
require_structMethod · 0.80
to_ownedMethod · 0.80
mapMethod · 0.45
iterMethod · 0.45
global_envMethod · 0.45
instantiateMethod · 0.45

Tested by 1