use Ptr instead of Boxed in the code-gen-help

This commit is contained in:
Folkert 2023-06-28 22:35:39 +02:00 committed by Anton-4
parent cde3615ec2
commit 3b18494ddd
4 changed files with 83 additions and 80 deletions

View file

@ -2108,6 +2108,16 @@ impl<'a> Expr<'a> {
w.push(b'\n');
String::from_utf8(w).unwrap()
}
pub(crate) fn ptr_load(symbol: &'a Symbol) -> Expr<'a> {
Expr::Call(Call {
call_type: CallType::LowLevel {
op: LowLevel::PtrLoad,
update_mode: UpdateModeId::BACKEND_DUMMY,
},
arguments: std::slice::from_ref(symbol),
})
}
}
impl<'a> Stmt<'a> {