Skip to content

Commit

Permalink
pull from libs branchs
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoGiachetta committed Oct 14, 2024
1 parent 2d8c3d8 commit 55ddb8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
4 changes: 4 additions & 0 deletions src/vm/const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(_) => {
Expand Down
13 changes: 0 additions & 13 deletions src/vm/uint128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,6 @@ pub fn eval(
}
}

pub fn eval_byte_reverse(
_registry: &ProgramRegistry<CoreType, CoreLibfunc>,
_info: &SignatureOnlyConcreteLibfunc,
args: Vec<Value>,
) -> 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<CoreType, CoreLibfunc>,
_info: &SignatureOnlyConcreteLibfunc,
Expand Down

0 comments on commit 55ddb8b

Please sign in to comment.