mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
use user-provided seed
This commit is contained in:
parent
31fc62b7f0
commit
352008e8a0
5 changed files with 30 additions and 11 deletions
|
@ -3982,9 +3982,13 @@ fn run_low_level<'a, 'ctx, 'env>(
|
|||
)
|
||||
}
|
||||
Hash => {
|
||||
let (value, layout) = load_symbol_and_layout(scope, &args[0]);
|
||||
debug_assert_eq!(args.len(), 2);
|
||||
let seed = load_symbol(scope, &args[0]);
|
||||
let (value, layout) = load_symbol_and_layout(scope, &args[1]);
|
||||
|
||||
hash(env, value, layout)
|
||||
debug_assert!(seed.is_int_value());
|
||||
|
||||
hash(env, seed.into_int_value(), value, layout)
|
||||
}
|
||||
DictSize => {
|
||||
debug_assert_eq!(args.len(), 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue