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

Method new

language/move-prover/bytecode/src/stackless_bytecode_generator.rs:48–63  ·  view source on GitHub ↗
(func_env: &'a FunctionEnv<'a>)

Source from the content-addressed store, hash-verified

46
47impl<'a> StacklessBytecodeGenerator<'a> {
48 pub fn new(func_env: &'a FunctionEnv<'a>) -> Self {
49 let local_types = (0..func_env.get_local_count())
50 .map(|i| func_env.get_local_type(i))
51 .collect_vec();
52 StacklessBytecodeGenerator {
53 func_env,
54 module: func_env.module_env.get_verified_module(),
55 temp_count: local_types.len(),
56 temp_stack: vec![],
57 local_types,
58 code: vec![],
59 location_table: BTreeMap::new(),
60 loop_invariants: BTreeSet::new(),
61 fallthrough_labels: BTreeSet::new(),
62 }
63 }
64
65 pub fn generate_function(mut self) -> FunctionData {
66 let original_code = self.func_env.get_bytecode();

Callers

nothing calls this directly

Calls 5

get_verified_moduleMethod · 0.80
mapMethod · 0.45
get_local_countMethod · 0.45
get_local_typeMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected