Skip to content
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

fixes #23295; don't expand constants for complex structures #23297

Merged
merged 6 commits into from
Feb 20, 2024

Conversation

ringabout
Copy link
Member

fixes #23295

@ringabout
Copy link
Member Author

Or use isCaseObj to filter types

compiler/ccgcalls.nim Outdated Show resolved Hide resolved
@ringabout
Copy link
Member Author

One way or another, we should extend dontInlineConstant to case object variants because of the data structures of object variants stored in the VM.

We can choose either apply noinline to cnst which is a complex constant (array, etc.) or we need to inspect the types or nodes of cnst in order to enforce noinline for object variants.

@ringabout ringabout marked this pull request as ready for review February 19, 2024 12:17
@Araq Araq merged commit 39f2df1 into devel Feb 20, 2024
22 checks passed
@Araq Araq deleted the ringabout-patch-5 branch February 20, 2024 06:31
Copy link
Contributor

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

Hint: mm: orc; opt: speed; options: -d:release
178000 lines; 7.642s; 769.07MiB peakmem

narimiran pushed a commit that referenced this pull request Dec 16, 2024
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.

Wrong behaviour when wrapping a constant object variant into a sequence at runtime
2 participants