From 2c130de4cd38464d7514f1c18e531479aebd3d04 Mon Sep 17 00:00:00 2001 From: schaeff Date: Tue, 7 Oct 2025 11:50:43 +0200 Subject: [PATCH 1/2] remove send + sync bound on executor --- crates/vm/src/arch/config.rs | 2 +- crates/vm/src/arch/interpreter_preflight.rs | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/crates/vm/src/arch/config.rs b/crates/vm/src/arch/config.rs index 305a51c1bd..ff5e75fd89 100644 --- a/crates/vm/src/arch/config.rs +++ b/crates/vm/src/arch/config.rs @@ -72,7 +72,7 @@ where } pub trait VmExecutionConfig { - type Executor: AnyEnum + Send + Sync; + type Executor: AnyEnum; fn create_executors(&self) -> Result, ExecutorInventoryError>; diff --git a/crates/vm/src/arch/interpreter_preflight.rs b/crates/vm/src/arch/interpreter_preflight.rs index 2cd59c80d1..cb9feefe0a 100644 --- a/crates/vm/src/arch/interpreter_preflight.rs +++ b/crates/vm/src/arch/interpreter_preflight.rs @@ -102,16 +102,13 @@ impl PreflightInterpretedInstance { } pub fn filtered_execution_frequencies(&self) -> Vec - where - E: Send + Sync, { let base_idx = get_pc_index(self.pc_base); self.pc_handler .par_iter() - .enumerate() + .zip_eq(&self.execution_frequencies) .skip(base_idx) - .filter(|(_, entry)| entry.is_some()) - .map(|(i, _)| self.execution_frequencies[i]) + .filter_map(|(entry, freq)| entry.is_some().then_some(*freq)) .collect() } From 6c3dd844e024faece08ecfcc50df0259d5d00d83 Mon Sep 17 00:00:00 2001 From: schaeff Date: Wed, 8 Oct 2025 13:34:56 +0200 Subject: [PATCH 2/2] fmt, clippy --- crates/vm/src/arch/interpreter_preflight.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/vm/src/arch/interpreter_preflight.rs b/crates/vm/src/arch/interpreter_preflight.rs index cb9feefe0a..187ab13d37 100644 --- a/crates/vm/src/arch/interpreter_preflight.rs +++ b/crates/vm/src/arch/interpreter_preflight.rs @@ -101,8 +101,7 @@ impl PreflightInterpretedInstance { &self.inventory.executors } - pub fn filtered_execution_frequencies(&self) -> Vec - { + pub fn filtered_execution_frequencies(&self) -> Vec { let base_idx = get_pc_index(self.pc_base); self.pc_handler .par_iter()