mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
WIP
This commit is contained in:
parent
4a9514d2c4
commit
0247237fe8
16 changed files with 625 additions and 163 deletions
|
@ -1304,8 +1304,28 @@ pub(crate) fn run_low_level<'a, 'ctx>(
|
|||
.into()
|
||||
}
|
||||
|
||||
PtrStore | PtrLoad | PtrToZeroed | RefCountIncRcPtr | RefCountDecRcPtr
|
||||
| RefCountIncDataPtr | RefCountDecDataPtr => {
|
||||
PtrStore => {
|
||||
arguments!(ptr, value);
|
||||
|
||||
env.builder.build_store(ptr.into_pointer_value(), value);
|
||||
|
||||
// ptr
|
||||
env.context.struct_type(&[], false).const_zero().into()
|
||||
}
|
||||
|
||||
PtrLoad => {
|
||||
arguments!(ptr);
|
||||
|
||||
let ret_repr = layout_interner.get_repr(layout);
|
||||
let element_type = basic_type_from_layout(env, layout_interner, ret_repr);
|
||||
|
||||
env.builder
|
||||
.new_build_load(element_type, ptr.into_pointer_value(), "ptr_load")
|
||||
}
|
||||
|
||||
PtrToZeroed => todo!(),
|
||||
|
||||
RefCountIncRcPtr | RefCountDecRcPtr | RefCountIncDataPtr | RefCountDecDataPtr => {
|
||||
unreachable!("Not used in LLVM backend: {:?}", op);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue