Nim
Nim copied to clipboard
fixes #23295; don't expand constants for complex structures
fixes #23295
Or use isCaseObj
to filter types
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.
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