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

Method emit_with

language/move-prover/bytecode/src/function_data_builder.rs:169–181  ·  view source on GitHub ↗

Emits a bytecode via a function which takes a freshly generated attribute id.

(&mut self, f: F)

Source from the content-addressed store, hash-verified

167
168 /// Emits a bytecode via a function which takes a freshly generated attribute id.
169 pub fn emit_with<F>(&mut self, f: F)
170 where
171 F: FnOnce(AttrId) -> Bytecode,
172 {
173 let attr_id = self.new_attr();
174 if let Some(info) = std::mem::take(&mut self.next_vc_info) {
175 self.data.vc_infos.insert(attr_id, info);
176 }
177 if let Some(comment) = std::mem::take(&mut self.next_debug_comment) {
178 self.data.debug_comments.insert(attr_id, comment);
179 }
180 self.emit(f(attr_id))
181 }
182
183 /// Emits a Bytecode::Prop based on given kind and expression.
184 pub fn emit_prop(&mut self, kind: PropKind, exp: Exp) {

Callers 15

processMethod · 0.80
processMethod · 0.80
instrumentMethod · 0.80
instrument_bytecodeMethod · 0.80
instrument_callMethod · 0.80
emit_save_for_oldMethod · 0.80
emit_updatesMethod · 0.80
emit_letsMethod · 0.80
emit_tracesMethod · 0.80
generate_abort_blockMethod · 0.80
generate_abort_verifyMethod · 0.80

Calls 3

new_attrMethod · 0.80
insertMethod · 0.45
emitMethod · 0.45

Tested by 12

instrumentMethod · 0.64
instrument_bytecodeMethod · 0.64
instrument_callMethod · 0.64
emit_save_for_oldMethod · 0.64
emit_updatesMethod · 0.64
emit_letsMethod · 0.64
emit_tracesMethod · 0.64
generate_abort_blockMethod · 0.64
generate_abort_verifyMethod · 0.64
generate_return_blockMethod · 0.64
generate_opaque_callMethod · 0.64