Adds castToNat

This commit is contained in:
Joshua Hoeflich 2021-08-18 11:02:20 -05:00
parent 7068da7144
commit 92da003fba
8 changed files with 23 additions and 2 deletions

View file

@ -4738,6 +4738,11 @@ fn run_low_level<'a, 'ctx, 'env>(
}
}
}
NumCastToNat => {
debug_assert_eq!(args.len(), 1);
let num = load_symbol(scope, &args[0]).into_int_value();
call_bitcode_fn(env, &[num.into()], bitcode::NUM_CAST_TO_NAT)
}
NumBytesToU16 => {
debug_assert_eq!(args.len(), 2);
let list = load_symbol(scope, &args[0]).into_struct_value();