@@ -878,7 +878,7 @@ impl AcirContext {
878
878
// Optimistically try executing the brillig now, if we can complete execution they just return the results.
879
879
// This is a temporary measure pending SSA optimizations being applied to Brillig which would remove constant-input opcodes (See #2066)
880
880
if let Some ( brillig_outputs) =
881
- self . execute_brillig ( generated_brillig. byte_code . clone ( ) , & b_inputs, & outputs)
881
+ self . execute_brillig ( & generated_brillig. byte_code , & b_inputs, & outputs)
882
882
{
883
883
return Ok ( brillig_outputs) ;
884
884
}
@@ -965,7 +965,7 @@ impl AcirContext {
965
965
966
966
fn execute_brillig (
967
967
& mut self ,
968
- code : Vec < BrilligOpcode > ,
968
+ code : & [ BrilligOpcode ] ,
969
969
inputs : & [ BrilligInputs ] ,
970
970
outputs_types : & [ AcirType ] ,
971
971
) -> Option < Vec < AcirValue > > {
@@ -1238,7 +1238,7 @@ pub(crate) struct AcirVar(usize);
1238
1238
///
1239
1239
/// Returns `None` if complete execution of the Brillig bytecode is not possible.
1240
1240
fn execute_brillig (
1241
- code : Vec < BrilligOpcode > ,
1241
+ code : & [ BrilligOpcode ] ,
1242
1242
inputs : & [ BrilligInputs ] ,
1243
1243
) -> Option < ( Registers , Vec < Value > ) > {
1244
1244
struct NullBbSolver ;
@@ -1294,7 +1294,7 @@ fn execute_brillig(
1294
1294
1295
1295
// Instantiate a Brillig VM given the solved input registers and memory, along with the Brillig bytecode.
1296
1296
let input_registers = Registers :: load ( input_register_values) ;
1297
- let mut vm = VM :: new ( input_registers, input_memory, & code, Vec :: new ( ) , & NullBbSolver ) ;
1297
+ let mut vm = VM :: new ( input_registers, input_memory, code, Vec :: new ( ) , & NullBbSolver ) ;
1298
1298
1299
1299
// Run the Brillig VM on these inputs, bytecode, etc!
1300
1300
let vm_status = vm. process_opcodes ( ) ;
0 commit comments