| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
fixes #23907
|
|
|
| |
fixes #23775
|
|
|
|
|
|
| |
type (#23608)
fixes #20048
fixes #15746
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
refs (#23507)
fixes #23505
|
|
|
| |
fixes #23440
|
|
|
| |
Signed-off-by: soonsouth <cuibuwei@163.com>
|
|
|
|
|
|
|
|
|
| |
ref #23354
The new move analyzer requires types that have the tfAsgn flag
(otherwise `lastRead` will return true); tfAsgn is included when the
destructor is not trival. But it should consider the assignement for
objects in this case because objects might have a trival destructors but
it's the assignement that matters when it is passed to sink parameters.
|
|
|
| |
fixes #22723
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fixes #23247
closes #23251 (which accounts for why the openarray type is lifted
because ops are lifted for openarray conversions)
related: https://github.com/nim-lang/Nim/pull/18713
It seems to me that openarray doesn't own the data, so it cannot destroy
itself. The same case should be applied to
https://github.com/nim-lang/Nim/issues/19435. It shouldn't be destroyed
even openarray can have a destructor. A cleanup will be followed for
https://github.com/nim-lang/Nim/pull/19723 if it makes sense.
According to https://github.com/nim-lang/Nim/pull/12073, it lifts
destructor for openarray when openarray is sunk into the function, when
means `sink openarray` owns the data and needs to destroy it. In other
cases, destructor shouldn't be lifted for `openarray` in the first place
and it shouldn't destroy the data if it doesn't own it.
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
custom destructors (#22901)
fixes #22866;
fixes #19998
|
|
|
| |
follow up https://github.com/nim-lang/Nim/pull/22851
|
|
|
|
|
|
|
|
|
|
|
| |
* Keep return in mind for sink
* Keep track of return using bool instead of mode
* Update compiler/injectdestructors.nim
* Add back IsReturn
---------
Co-authored-by: SirOlaf <>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* wip; use strictdefs for compiler
* checkpoint
* complete the chores
* more fixes
* first phase cleanup
* Update compiler/bitsets.nim
* cleanup
|
| |
|
|
|
|
|
| |
(#22388)
* fix #15005 [ARC] Global variable declared in a block is destroyed too early
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* implement `ensureMove`
* use an additional flag
* improve some logics
* progress: fixes discard ensureMove
* forbids nested expressions
* improve error messages
* checkpoint
* fixes cursor
* ADD MORE TESTS
* fixes cursorinference again
* tiny cleanup
* improve error messages
* fixes docs
* implement comments add more tests
* fixes js
|
| |
|
|
|
|
|
|
|
|
|
|
| |
var T)` (#22130)
* make destructors accept non var parameters
* define nimAllowNonVarDestructor
* add a test case and a changelog
* update documentation and error messages
* deprecate destructors taking 'var T'
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* fixes tests again
* remove helper functions
* fixes closures, owned refs
* final cleanup
|
|
|
|
|
| |
* fixes #21974; fixes sameConstant fieldDefect
* add a test case
|
|
|
|
|
|
|
| |
(#21831)
* improve `wasMoved` hooks
* Because `wasMoved` is lifted
|
|
|
|
|
|
|
|
|
|
|
| |
* adds documentation for `=wasMoved` and `=dup` hooks and small fixes
* Update doc/destructors.md
* Update doc/destructors.md
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bring #21802 back; fixes #21753 [backport]
* adds tests and multiple fixes
* add test cases
* refactor and remove startId
* fixes custom hooks and adds tests
* handle tyUncheckedArray better
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* import `=dup` hook eliminating `wasMoved` and `=copy` pairs
* add dup
* add a test for dup
* fixes documentation
* fixes signature
* resolve comments
* fixes tests
* fixes tests
* clean up
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(#21667)
* refactoring in preparation for better, simpler name mangling that works with IC flawlessly
* use new disamb field
* see if this makes tests green
* make tests green again
|
|
|
|
|
| |
* fixes #20993 [backport:1.6]
* proper line endings for the test file
|
|
|
|
|
|
|
|
|
|
|
| |
* fix #18977 disallow change branch of an object variant in ORC
* check errors for goto exception
* fixes conditions
* fixes tests
* add a test case for #18977
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#21274) [backport:1.6]
* fixes #20139; hash types based on its path relative its project
* add a test case
* fixes procs
* better implementation and test case
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fixes #19291; implements `wasMoved` hook
* basics
* checkpoint
* finish `wasMoved`
* add a test for #19291
* add documentation and changelog
* work `attachedWasMoved` with generics
* fixes optimizer
* register `=wasMoved`
* handle wasMoved magcis
* check another round
* some patches
* try `op == nil`
* nicer
* generate `wasMoved` before `destroy`
* try again
* fixes tests
* default wasMoved
* Update tests/destructor/tv2_cast.nim
* Update tests/destructor/tv2_cast.nim
* Update tests/arc/topt_refcursors.nim
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* temp
* unsure
* fix condition
* port macro arc runable examples to one file
* trigger doc ci
* fix
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
|
|
|
|
|
|
|
| |
* Revert "fix arc global variable issues (#20759)"
This reverts commit a3d32a4176539d0829a4e868f4b005a1a71eb7ee.
* trigger documentation builds
|
|
|
|
|
| |
* temp
* unsure
|
|
|
|
|
| |
* fixes #20572
* added a test case
|
| |
|
|
|
|
|
|
|
|
|
|
| |
block (#19953)
* fixes #18645; C Compiler error when initializing {.global.} with a block:
* arguably cleaner solution
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
Co-authored-by: Araq <rumpf_a@web.de>
|
|
|
|
|
|
|
|
| |
* produce better code for closure environment creation
* new 'first write' analysis;
* scope based move analyser
* code cleanup
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* continue #9582 for consts, close #9331, fix #20114
also move extractPragma to ast to pave the way for things like {.strdefine: "abc".} etc
* changelog correctly
* fix jsgen
* update tgetimpl
* fix sighashes
* fix #19766, add comment about postfix
* fix noRewrite LOL
refs #16620
* fix changelog
* fix destructors
|
|
|
| |
fixes #20303; wasMoved expressions with side effects
|