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 #24623; fixes #23692; size pragma only allowed for imported types and enum types #24640

Merged
merged 4 commits into from
Jan 23, 2025

Conversation

ringabout
Copy link
Member

@ringabout ringabout commented Jan 23, 2025

fixes #24623
fixes #23692

ref https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-size-pragma

confines size pragma to enums and imported objects for now

The typeDefLeftSidePass carries out the check for pragmas, but the type is not complete yet. So the size pragma checking is postponed at the final pass.

@ringabout ringabout changed the title fixes #24623; size pragma only allowed for objects and enums fixes #24623; fixes #23692; size pragma only allowed for objects and enums Jan 23, 2025
@ringabout ringabout changed the title fixes #24623; fixes #23692; size pragma only allowed for objects and enums fixes #24623; fixes #23692; size pragma only allowed for imported objects and enums Jan 23, 2025
@ringabout ringabout changed the title fixes #24623; fixes #23692; size pragma only allowed for imported objects and enums fixes #24623; fixes #23692; size pragma only allowed for imported types and enum types Jan 23, 2025
@Araq Araq merged commit d6d28a9 into devel Jan 23, 2025
21 checks passed
@Araq Araq deleted the pr_size_disable branch January 23, 2025 19:10
Copy link
Contributor

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

Hint: mm: orc; opt: speed; options: -d:release
178432 lines; 9.217s; 651.406MiB peakmem

narimiran pushed a commit that referenced this pull request Jan 24, 2025
…es and enum types (#24640)

fixes #24623
fixes #23692

ref
https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-size-pragma

confines `size` pragma to `enums` and imported `objects` for now

The `typeDefLeftSidePass` carries out the check for pragmas, but the
type is not complete yet. So the `size` pragma checking is postponed at
the final pass.

(cherry picked from commit d6d28a9)
narimiran pushed a commit that referenced this pull request Jan 24, 2025
…es and enum types (#24640)

fixes #24623
fixes #23692

ref
https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-size-pragma

confines `size` pragma to `enums` and imported `objects` for now

The `typeDefLeftSidePass` carries out the check for pragmas, but the
type is not complete yet. So the `size` pragma checking is postponed at
the final pass.

(cherry picked from commit d6d28a9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants