Nim icon indicating copy to clipboard operation
Nim copied to clipboard

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

Open ringabout opened this issue 1 year ago • 2 comments

fixes #23295

ringabout avatar Feb 09 '24 09:02 ringabout

Or use isCaseObj to filter types

ringabout avatar Feb 09 '24 09:02 ringabout

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 avatar Feb 09 '24 14:02 ringabout

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

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

github-actions[bot] avatar Feb 20 '24 06:02 github-actions[bot]