mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
Hash Low Level
This commit is contained in:
parent
cddd64f1c9
commit
64d69b9ec4
3 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
use crate::llvm::build_hash::build_hash;
|
||||||
use crate::llvm::build_list::{
|
use crate::llvm::build_list::{
|
||||||
allocate_list, empty_list, empty_polymorphic_list, list_append, list_concat, list_contains,
|
allocate_list, empty_list, empty_polymorphic_list, list_append, list_concat, list_contains,
|
||||||
list_get_unsafe, list_join, list_keep_if, list_len, list_map, list_prepend, list_repeat,
|
list_get_unsafe, list_join, list_keep_if, list_len, list_map, list_prepend, list_repeat,
|
||||||
|
@ -3086,6 +3087,11 @@ fn run_low_level<'a, 'ctx, 'env>(
|
||||||
empty,
|
empty,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Hash => {
|
||||||
|
let (value, layout) = load_symbol_and_layout(env, scope, &args[0]);
|
||||||
|
|
||||||
|
build_hash(env, value, layout)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,4 +64,5 @@ pub enum LowLevel {
|
||||||
And,
|
And,
|
||||||
Or,
|
Or,
|
||||||
Not,
|
Not,
|
||||||
|
Hash,
|
||||||
}
|
}
|
||||||
|
|
|
@ -543,5 +543,6 @@ pub fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[bool] {
|
||||||
}
|
}
|
||||||
StrStartsWith | StrEndsWith => arena.alloc_slice_copy(&[owned, borrowed]),
|
StrStartsWith | StrEndsWith => arena.alloc_slice_copy(&[owned, borrowed]),
|
||||||
StrFromInt => arena.alloc_slice_copy(&[irrelevant]),
|
StrFromInt => arena.alloc_slice_copy(&[irrelevant]),
|
||||||
|
Hash => arena.alloc_slice_copy(&[borrowed]),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue