mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
optimize RC
This commit is contained in:
parent
4e39543054
commit
cde8f5cbd4
2 changed files with 6 additions and 3 deletions
|
@ -110,9 +110,11 @@ pub fn decrefC(
|
|||
) callconv(.C) void {
|
||||
// IMPORTANT: bytes_or_null is this case is expected to be a pointer to the refcount
|
||||
// (NOT the start of the data, or the start of the allocation)
|
||||
if (bytes_or_null) |bytes| {
|
||||
return @call(.{ .modifier = always_inline }, decref_ptr_to_refcount, .{ bytes, alignment });
|
||||
}
|
||||
|
||||
// this is of course unsafe, but we trust what we get from the llvm side
|
||||
var bytes = @ptrCast([*]isize, bytes_or_null);
|
||||
|
||||
return @call(.{ .modifier = always_inline }, decref_ptr_to_refcount, .{ bytes, alignment });
|
||||
}
|
||||
|
||||
pub fn decref(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue