mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
Lowlevels: replace RefCountGetPtr with the more general GetPtrAsInt.
This commit is contained in:
parent
a1d883600c
commit
e847c924dd
7 changed files with 104 additions and 44 deletions
|
@ -531,13 +531,13 @@ trait Backend<'a> {
|
|||
arg_layouts,
|
||||
ret_layout,
|
||||
),
|
||||
LowLevel::RefCountGetPtr => {
|
||||
LowLevel::PtrCast => {
|
||||
debug_assert_eq!(
|
||||
1,
|
||||
args.len(),
|
||||
"RefCountGetPtr: expected to have exactly one argument"
|
||||
);
|
||||
self.build_refcount_getptr(sym, &args[0])
|
||||
self.build_ptr_cast(sym, &args[0])
|
||||
}
|
||||
LowLevel::RefCountDec => self.build_fn_call(
|
||||
sym,
|
||||
|
@ -642,7 +642,7 @@ trait Backend<'a> {
|
|||
);
|
||||
|
||||
/// build_refcount_getptr loads the pointer to the reference count of src into dst.
|
||||
fn build_refcount_getptr(&mut self, dst: &Symbol, src: &Symbol);
|
||||
fn build_ptr_cast(&mut self, dst: &Symbol, src: &Symbol);
|
||||
|
||||
/// literal_map gets the map from symbol to literal and layout, used for lazy loading and literal folding.
|
||||
fn literal_map(&mut self) -> &mut MutMap<Symbol, (*const Literal<'a>, *const Layout<'a>)>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue