From dcdc8511748990bcf3b2459b6143ccb4c876bb4e Mon Sep 17 00:00:00 2001 From: Tom French Date: Sat, 12 Oct 2024 00:02:36 +0100 Subject: [PATCH] . --- .../src/ssa/ir/instruction/call/blackbox.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/noir/noir-repo/compiler/noirc_evaluator/src/ssa/ir/instruction/call/blackbox.rs b/noir/noir-repo/compiler/noirc_evaluator/src/ssa/ir/instruction/call/blackbox.rs index fb9dec7e6b7..3881646d5e4 100644 --- a/noir/noir-repo/compiler/noirc_evaluator/src/ssa/ir/instruction/call/blackbox.rs +++ b/noir/noir-repo/compiler/noirc_evaluator/src/ssa/ir/instruction/call/blackbox.rs @@ -1,5 +1,3 @@ -use std::sync::Arc; - use acvm::{acir::AcirField, BlackBoxFunctionSolver, BlackBoxResolutionError, FieldElement}; use iter_extended::vecmap; @@ -41,13 +39,11 @@ pub(super) fn simplify_ec_add( return SimplifyResult::None; }; - let result_x = dfg.make_constant(result_x, Type::field()); - let result_y = dfg.make_constant(result_y, Type::field()); - let result_is_infinity = dfg.make_constant(result_is_infinity, Type::field()); - - let typ = Type::Array(Arc::new(vec![Type::field()]), 3); - let result_array = - dfg.make_array(im::vector![result_x, result_y, result_is_infinity], typ); + let result_array = make_constant_array( + dfg, + vec![result_x, result_y, result_is_infinity], + Type::field(), + ); SimplifyResult::SimplifiedTo(result_array) }