mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
avoid extra joinpoint and loop for list refcounting
This commit is contained in:
parent
0d083bc192
commit
afda757433
1 changed files with 3 additions and 1 deletions
|
@ -77,7 +77,9 @@ pub fn refcount_stmt<'a>(
|
|||
ModifyRc::DecRef(structure) => {
|
||||
match layout_interner.get_repr(layout) {
|
||||
// Str has no children, so Dec is the same as DecRef.
|
||||
LayoutRepr::Builtin(Builtin::Str) => {
|
||||
// List has children, but it is dealt with by LowLevel::ListDecRef.
|
||||
// It correctly handles both Dec and DecRef
|
||||
LayoutRepr::Builtin(Builtin::Str | Builtin::List(_)) => {
|
||||
ctx.op = HelperOp::Dec;
|
||||
refcount_stmt(
|
||||
root,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue