diff --git a/cranelift/interpreter/src/frame.rs b/cranelift/interpreter/src/frame.rs index 21c41c9962..367c797c2f 100644 --- a/cranelift/interpreter/src/frame.rs +++ b/cranelift/interpreter/src/frame.rs @@ -30,16 +30,6 @@ impl<'a> Frame<'a> { } } - /// Construct a new [Frame] with the given `values` assigned to their corresponding slot - /// (from the SSA references in `parameters`) in the [Frame]. - pub fn with_parameters(mut self, parameters: &[ValueRef], values: &[DataValue]) -> Self { - assert_eq!(parameters.len(), values.len()); - for (n, v) in parameters.iter().zip(values) { - self.registers.insert(*n, v.clone()); - } - self - } - /// Retrieve the actual value associated with an SSA reference. #[inline] pub fn get(&self, name: &ValueRef) -> &DataValue { diff --git a/cranelift/interpreter/src/interpreter.rs b/cranelift/interpreter/src/interpreter.rs index 61d3133603..2790a78d7a 100644 --- a/cranelift/interpreter/src/interpreter.rs +++ b/cranelift/interpreter/src/interpreter.rs @@ -112,7 +112,8 @@ impl Interpreter { .next() .expect("to have a first block"); let parameters = function.dfg.block_params(first_block); - let mut frame = Frame::new(function).with_parameters(parameters, arguments); + let mut frame = Frame::new(function); + frame.set_all(parameters, arguments.to_vec()); self.block(&mut frame, first_block) }