mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
make hash work for integers/floats/strings
This commit is contained in:
parent
1afd64f7e7
commit
2d63e24843
9 changed files with 88 additions and 18 deletions
|
@ -280,12 +280,6 @@ fn add_intrinsics<'ctx>(ctx: &'ctx Context, module: &Module<'ctx>, ptr_size: u32
|
|||
let byte_slice_type =
|
||||
ctx.struct_type(&[i8_ptr_type.into(), ptr_int(ctx, ptr_size).into()], false);
|
||||
|
||||
add_intrinsic(
|
||||
module,
|
||||
ZIG_WYHASH_BYTES,
|
||||
i64_type.fn_type(&[i64_type.into(), byte_slice_type.into()], false),
|
||||
);
|
||||
|
||||
add_intrinsic(
|
||||
module,
|
||||
LLVM_MEMSET_I64,
|
||||
|
@ -381,7 +375,6 @@ fn add_intrinsics<'ctx>(ctx: &'ctx Context, module: &Module<'ctx>, ptr_size: u32
|
|||
});
|
||||
}
|
||||
|
||||
pub static ZIG_WYHASH_BYTES: &str = "wyhash_hash";
|
||||
static LLVM_MEMSET_I64: &str = "llvm.memset.p0i8.i64";
|
||||
static LLVM_MEMSET_I32: &str = "llvm.memset.p0i8.i32";
|
||||
static LLVM_SQRT_F64: &str = "llvm.sqrt.f64";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue