Address various bits of feedback

This commit is contained in:
Jared Ramirez 2021-07-09 09:30:45 -07:00
parent 8ffe02110d
commit a35cc321ab
4 changed files with 81 additions and 23 deletions

View file

@ -443,13 +443,7 @@ fn add_intrinsics<'ctx>(ctx: &'ctx Context, module: &Module<'ctx>) {
ctx.struct_type(&fields, false)
.fn_type(&[i64_type.into(), i64_type.into()], false)
});
// TODO: This is now exported by zig. Not sure what to do here?
// add_intrinsic(module, LLVM_SADD_WITH_OVERFLOW_I128, {
// let fields = [i128_type.into(), i1_type.into()];
// ctx.struct_type(&fields, false)
// .fn_type(&[i128_type.into(), i128_type.into()], false)
// });
// LLVM_SADD_WITH_OVERFLOW_I128 is expoerted in bitcode
// sub with overflow
@ -476,13 +470,7 @@ fn add_intrinsics<'ctx>(ctx: &'ctx Context, module: &Module<'ctx>) {
ctx.struct_type(&fields, false)
.fn_type(&[i64_type.into(), i64_type.into()], false)
});
// TODO: This is now exported by zig. Not sure what to do here?
// add_intrinsic(module, LLVM_SSUB_WITH_OVERFLOW_I128, {
// let fields = [i128_type.into(), i1_type.into()];
// ctx.struct_type(&fields, false)
// .fn_type(&[i128_type.into(), i128_type.into()], false)
// });
// LLVM_SSUB_WITH_OVERFLOW_I128 is expoerted in bitcode
}
static LLVM_MEMSET_I64: &str = "llvm.memset.p0i8.i64";

View file

@ -127,13 +127,11 @@ fn hash_builtin<'a, 'ctx, 'env>(
| Builtin::Float32
| Builtin::Float128
| Builtin::Float16
| Builtin::Decimal
| Builtin::Usize => {
let hash_bytes = store_and_use_as_u8_ptr(env, val, &layout);
hash_bitcode_fn(env, seed, hash_bytes, layout.stack_size(ptr_bytes))
}
Builtin::Decimal => {
panic!("TODO: Hash Decimal");
}
Builtin::Str => {
// let zig deal with big vs small string
call_bitcode_fn(