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 #23524; global variables cannot be analysed when injecting move #23529

Merged
merged 5 commits into from Apr 24, 2024

Conversation

ringabout
Copy link
Member

@ringabout ringabout commented Apr 22, 2024

fixes #23524

proc isAnalysableFieldAccess*(orig: PNode; owner: PSym): bool =
  ...
  result = n.kind == nkSym and n.sym.owner == owner and
    {sfGlobal, sfThread, sfCursor} * n.sym.flags == {} and
    (n.sym.kind != skParam or isSinkParam(n.sym))

In isAnalysableFieldAccess, globals, cursors are already rejected

@ringabout ringabout changed the title fixes #23524; global variables cannot be analysed fixes #23524; global variables cannot be analysed when injecting move Apr 22, 2024
@Araq Araq merged commit cd3cf3a into devel Apr 24, 2024
19 checks passed
@Araq Araq deleted the pr_global_undisturbed branch April 24, 2024 10:47
Copy link
Contributor

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

Hint: mm: orc; opt: speed; options: -d:release
178533 lines; 8.164s; 752.809MiB 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.

Top level variables are moved sometimes
2 participants