1
- use std:: {
2
- collections:: { BTreeSet , HashMap } ,
3
- ops:: Range ,
4
- vec,
5
- } ;
1
+ use std:: { collections:: HashMap , ops:: Range , vec} ;
6
2
7
3
use crate :: instruction_builder as ib;
8
4
use openvm_instructions:: { exe:: VmExe , instruction:: Instruction , program:: Program , riscv} ;
@@ -12,8 +8,8 @@ use womir::{
12
8
linker:: LabelValue ,
13
9
loader:: {
14
10
flattening:: {
15
- settings:: { ComparisonFunction , JumpCondition , LoopFrameLayout , Settings } ,
16
- Generators , RegisterGenerator , ReturnInfo , WriteOnceASM ,
11
+ settings:: { ComparisonFunction , JumpCondition , Settings } ,
12
+ Generators , WriteOnceASM ,
17
13
} ,
18
14
func_idx_to_label, CommonProgram ,
19
15
} ,
@@ -237,38 +233,6 @@ impl<'a, F: PrimeField32> Settings<'a> for OpenVMSettings<F> {
237
233
true
238
234
}
239
235
240
- fn allocate_loop_frame_slots (
241
- & self ,
242
- need_ret_info : bool ,
243
- saved_fps : BTreeSet < u32 > ,
244
- ) -> ( RegisterGenerator < ' a , Self > , LoopFrameLayout ) {
245
- let mut rgen = RegisterGenerator :: new ( ) ;
246
-
247
- let ret_info = need_ret_info. then ( || {
248
- // Allocate the return PC and frame pointer for the loop.
249
- let ret_pc = rgen. allocate_words ( Self :: words_per_ptr ( ) ) ;
250
- let ret_fp = rgen. allocate_words ( Self :: words_per_ptr ( ) ) ;
251
- ReturnInfo { ret_pc, ret_fp }
252
- } ) ;
253
-
254
- // Allocate the slots for the saved frame pointers.
255
- let saved_fps = saved_fps
256
- . into_iter ( )
257
- . map ( |depth| {
258
- let outer_fp = rgen. allocate_words ( Self :: words_per_ptr ( ) ) ;
259
- ( depth, outer_fp)
260
- } )
261
- . collect ( ) ;
262
-
263
- (
264
- rgen,
265
- LoopFrameLayout {
266
- saved_fps,
267
- ret_info,
268
- } ,
269
- )
270
- }
271
-
272
236
fn to_plain_local_jump ( directive : Self :: Directive ) -> Result < String , Self :: Directive > {
273
237
if let Directive :: Jump { target } = directive {
274
238
Ok ( target)
0 commit comments