Skip to content

Commit

Permalink
no pass id
Browse files Browse the repository at this point in the history
  • Loading branch information
luffykai committed Jan 23, 2025
1 parent 06f0605 commit fea583e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions crates/vm/src/arch/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ pub struct VmExecutorNextSegmentState<F: PrimeField32> {
pub memory: MemoryImage<F>,
pub input: Streams<F>,
pub pc: u32,
pub segment_idx: usize,
}

pub struct VmExecutorOneSegmentResult<F: PrimeField32, VC: VmConfig<F>> {
Expand Down Expand Up @@ -136,17 +135,18 @@ where
let mut segment_idx = 0;

loop {
let _span = info_span!("execute_segment", segment = segment_idx).entered();
let one_segment_result =
self.execute_until_segment(exe.clone(), memory, streams, segment_idx, pc)?;
self.execute_until_segment(exe.clone(), memory, streams, pc)?;
segments.push(one_segment_result.segment);
if one_segment_result.next_state.is_none() {
break;
}
let next_state = one_segment_result.next_state.unwrap();
memory = next_state.memory;
pc = next_state.pc;
segment_idx = next_state.segment_idx;
streams = next_state.input;
segment_idx += 1;
}
tracing::debug!("Number of continuation segments: {}", segments.len());

Expand All @@ -161,7 +161,6 @@ where
exe: impl Into<VmExe<F>>,
memory: MemoryImage<F>,
input: impl Into<Streams<F>>,
segment_idx: usize,
pc: u32,
) -> Result<VmExecutorOneSegmentResult<F, VC>, ExecutionError> {
let exe = exe.into();
Expand All @@ -176,7 +175,6 @@ where
if let Some(overridden_heights) = self.overridden_heights.as_ref() {
segment.set_override_trace_heights(overridden_heights.clone());
}
let _span = info_span!("execute_segment", segment = segment_idx).entered();
let state = metrics_span("execute_time_ms", || segment.execute_from_pc(pc))?;

if state.is_terminated {
Expand Down Expand Up @@ -205,7 +203,6 @@ where
memory: final_memory,
input: streams,
pc: state.pc,
segment_idx: segment_idx + 1,
}),
})
}
Expand Down

0 comments on commit fea583e

Please sign in to comment.