summary refs log tree commit diff stats
path: root/compiler/jsgen.nim
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2024-04-24 18:47:05 +0800
committerGitHub <noreply@github.com>2024-04-24 12:47:05 +0200
commitcd3cf3a20e7bf6a115cd836ccc0c55ab07bcf3e9 (patch)
treeb01d787154ef22d1e7f328f808533a43025a449e /compiler/jsgen.nim
parent7e3bac92357b6fc3f959bdf81b2ad58c2111f8ab (diff)
downloadNim-cd3cf3a20e7bf6a115cd836ccc0c55ab07bcf3e9.tar.gz
fixes #23524; global variables cannot be analysed when injecting `move` (#23529)
fixes #23524

```nim
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
Diffstat (limited to 'compiler/jsgen.nim')
0 files changed, 0 insertions, 0 deletions