From 55ddb8bf81fd840dc77ae42f45450971604ce912 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Mon, 14 Oct 2024 14:32:06 -0300 Subject: [PATCH] pull from libs branchs --- src/vm/const.rs | 4 ++++ src/vm/uint128.rs | 13 ------------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/vm/const.rs b/src/vm/const.rs index a9a805b..d6269d3 100644 --- a/src/vm/const.rs +++ b/src/vm/const.rs @@ -113,6 +113,10 @@ fn inner( }, CoreTypeConcrete::Uint128(_) => match inner_data { [GenericArg::Value(value)] => Value::U128(value.try_into().unwrap()), + [GenericArg::Type(type_id)] => match registry.get_type(type_id).unwrap() { + CoreTypeConcrete::Const(info) => inner(registry, &info.inner_ty, &info.inner_data), + _ => unreachable!(), + }, _ => unreachable!(), }, CoreTypeConcrete::Struct(_) => { diff --git a/src/vm/uint128.rs b/src/vm/uint128.rs index 09e902b..7dc4c83 100644 --- a/src/vm/uint128.rs +++ b/src/vm/uint128.rs @@ -37,19 +37,6 @@ pub fn eval( } } -pub fn eval_byte_reverse( - _registry: &ProgramRegistry, - _info: &SignatureOnlyConcreteLibfunc, - args: Vec, -) -> EvalAction { - let [bitwise @ Value::Unit, Value::U128(input)]: [Value; 2] = args.try_into().unwrap() - else { - panic!() - }; - - EvalAction::NormalBranch(0, smallvec![bitwise, Value::U128(input.swap_bytes())]) -} - pub fn eval_guarantee_mul( _registry: &ProgramRegistry, _info: &SignatureOnlyConcreteLibfunc,