Skip to content

fixes #25007; implements setLenUninit for refc #25022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 14, 2025
Merged

fixes #25007; implements setLenUninit for refc #25022

merged 2 commits into from
Jul 14, 2025

Conversation

ringabout
Copy link
Member

@ringabout ringabout commented Jun 30, 2025

fixes #25007

proc setLengthSeqUninit(s: PGenericSeq, typ: PNimType, newLen: int, isTrivial: bool): PGenericSeq {.
    compilerRtl.} =

In this added function, only the line zeroMem(dataPointer(result, elemAlign, elemSize, newLen), (result.len-%newLen) *% elemSize) is removed from proc setLengthSeqV2 when enlarging a sequence.

JS and VM versions simply use setLen.

@Araq Araq merged commit 611b8bb into devel Jul 14, 2025
18 checks passed
@Araq Araq deleted the pr_add_refc branch July 14, 2025 21:20
Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from 611b8bb

Hint: mm: orc; opt: speed; options: -d:release
182867 lines; 8.794s; 659.902MiB peakmem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

setLenUninit missing for --mm:refc
2 participants