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

Method apply

language/move-bytecode-verifier/invalid-mutations/src/bounds/code_unit.rs:148–170  ·  view source on GitHub ↗
(mut self)

Source from the content-addressed store, hash-verified

146 }
147
148 pub fn apply(mut self) -> Vec<PartialVMError> {
149 let function_def_len = self.module.function_defs.len();
150
151 let mut mutation_map = BTreeMap::new();
152 for mutation in self
153 .mutations
154 .take()
155 .expect("mutations should always be present")
156 {
157 let picked_idx = mutation.function_def.index(function_def_len);
158 mutation_map
159 .entry(picked_idx)
160 .or_insert_with(Vec::new)
161 .push(mutation);
162 }
163
164 let mut results = vec![];
165
166 for (idx, mutations) in mutation_map {
167 results.extend(self.apply_one(idx, mutations));
168 }
169 results
170 }
171
172 fn apply_one(
173 &mut self,

Callers

nothing calls this directly

Calls 8

expectMethod · 0.80
takeMethod · 0.80
entryMethod · 0.80
lenMethod · 0.45
indexMethod · 0.45
pushMethod · 0.45
extendMethod · 0.45
apply_oneMethod · 0.45

Tested by

no test coverage detected