(func_env: &'a FunctionEnv<'a>)
| 46 | |
| 47 | impl<'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(); |
nothing calls this directly
no test coverage detected