Skip to content

Commit 4c651ef

Browse files
committed
bump womir and use default allocate_loop_frame_slots
1 parent 63b8e20 commit 4c651ef

File tree

3 files changed

+5
-41
lines changed

3 files changed

+5
-41
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ rrs-lib = "0.1.0"
4444
tracing = "0.1.40"
4545

4646
wasmparser = { version = "0.235", default-features = false }
47-
womir = { git = "https://github.com/powdr-labs/womir.git", rev = "44f1580" }
47+
womir = { git = "https://github.com/powdr-labs/womir.git", rev = "5c95d4b" }
4848

4949
# [patch."https://github.com/powdr-labs/openvm.git"]
5050
# openvm-sdk = { path = "../openvm/crates/sdk" }

integration/src/womir_translation.rs

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
use std::{
2-
collections::{BTreeSet, HashMap},
3-
ops::Range,
4-
vec,
5-
};
1+
use std::{collections::HashMap, ops::Range, vec};
62

73
use crate::instruction_builder as ib;
84
use openvm_instructions::{exe::VmExe, instruction::Instruction, program::Program, riscv};
@@ -12,8 +8,8 @@ use womir::{
128
linker::LabelValue,
139
loader::{
1410
flattening::{
15-
settings::{ComparisonFunction, JumpCondition, LoopFrameLayout, Settings},
16-
Generators, RegisterGenerator, ReturnInfo, WriteOnceASM,
11+
settings::{ComparisonFunction, JumpCondition, Settings},
12+
Generators, WriteOnceASM,
1713
},
1814
func_idx_to_label, CommonProgram,
1915
},
@@ -237,38 +233,6 @@ impl<'a, F: PrimeField32> Settings<'a> for OpenVMSettings<F> {
237233
true
238234
}
239235

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-
272236
fn to_plain_local_jump(directive: Self::Directive) -> Result<String, Self::Directive> {
273237
if let Directive::Jump { target } = directive {
274238
Ok(target)

0 commit comments

Comments
 (0)