TODO: Actually implement the functions

This commit is contained in:
Joshua Hoeflich 2021-08-14 19:28:13 -05:00
parent 9dad304e95
commit 22e781259d
10 changed files with 84 additions and 10 deletions

View file

@ -4756,6 +4756,24 @@ fn run_low_level<'a, 'ctx, 'env>(
bitcode::NUM_BYTES_TO_U16,
)
}
NumBytesToU32 => {
debug_assert_eq!(args.len(), 2);
let list = load_symbol(scope, &args[0]).into_struct_value();
let position = load_symbol(scope, &args[1]);
call_bitcode_fn(
env,
&[
complex_bitcast(
env.builder,
list.into(),
env.context.i128_type().into(),
"to_i128",
),
position.into(),
],
bitcode::NUM_BYTES_TO_U32,
)
}
NumCompare => {
use inkwell::FloatPredicate;