mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
first steps for init
This commit is contained in:
parent
352008e8a0
commit
b6ceaab341
5 changed files with 54 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
use crate::llvm::build_dict::{dict_empty, dict_len};
|
||||
use crate::llvm::build_dict::{dict_empty, dict_insert, dict_len};
|
||||
use crate::llvm::build_hash::hash;
|
||||
use crate::llvm::build_list::{
|
||||
allocate_list, empty_list, empty_polymorphic_list, list_append, list_concat, list_contains,
|
||||
|
@ -3998,6 +3998,14 @@ fn run_low_level<'a, 'ctx, 'env>(
|
|||
debug_assert_eq!(args.len(), 0);
|
||||
dict_empty(env, scope)
|
||||
}
|
||||
DictInsert => {
|
||||
debug_assert_eq!(args.len(), 3);
|
||||
|
||||
let (dict, _) = load_symbol_and_layout(scope, &args[0]);
|
||||
let (key, key_layout) = load_symbol_and_layout(scope, &args[1]);
|
||||
let (value, value_layout) = load_symbol_and_layout(scope, &args[2]);
|
||||
dict_insert(env, scope, dict, key, key_layout, value, value_layout)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue