From 6e5cc6d731228e3c0260e2b71e3d25f97e7684b3 Mon Sep 17 00:00:00 2001 From: sirasistant Date: Tue, 19 Dec 2023 08:19:56 +0000 Subject: [PATCH] fix: Acir gen doesn't panic --- .../src/ssa/acir_gen/acir_ir/acir_variable.rs | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/compiler/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs b/compiler/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs index 1f85145260..e039a7793c 100644 --- a/compiler/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs +++ b/compiler/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs @@ -1605,28 +1605,40 @@ fn execute_brillig( _signature: &[u8], _message: &[u8], ) -> Result { - unimplemented!("SchnorrVerify is not supported") + Err(BlackBoxResolutionError::Failed( + BlackBoxFunc::SchnorrVerify, + "SchnorrVerify is not supported".to_string(), + )) } fn pedersen_commitment( &self, _inputs: &[FieldElement], _domain_separator: u32, ) -> Result<(FieldElement, FieldElement), BlackBoxResolutionError> { - unimplemented!("PedersenCommitment is not supported") + Err(BlackBoxResolutionError::Failed( + BlackBoxFunc::PedersenCommitment, + "PedersenCommitment is not supported".to_string(), + )) } fn pedersen_hash( &self, _inputs: &[FieldElement], _domain_separator: u32, ) -> Result { - unimplemented!("PedersenHash is not supported") + Err(BlackBoxResolutionError::Failed( + BlackBoxFunc::PedersenHash, + "PedersenHash is not supported".to_string(), + )) } fn fixed_base_scalar_mul( &self, _low: &FieldElement, _high: &FieldElement, ) -> Result<(FieldElement, FieldElement), BlackBoxResolutionError> { - unimplemented!("FixedBaseScalarMul is not supported") + Err(BlackBoxResolutionError::Failed( + BlackBoxFunc::FixedBaseScalarMul, + "FixedBaseScalarMul is not supported".to_string(), + )) } }