summary refs log tree commit diff stats
path: root/compiler/injectdestructors.nim
Commit message (Collapse)AuthorAgeFilesLines
* IC: progress and refactorings (#22961)Andreas Rumpf2023-11-201-1/+1
|
* fixes #22866; fixes #19998; ensure destruction for Object construction with ↵ringabout2023-11-021-1/+3
| | | | | | custom destructors (#22901) fixes #22866; fixes #19998
* prepare for the enforcement of `std` prefix (#22873)ringabout2023-10-291-2/+4
| | | follow up https://github.com/nim-lang/Nim/pull/22851
* Fix #21722 (#22512)SirOlaf2023-08-191-6/+8
| | | | | | | | | | | * 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>
* fixes #22357; don't sink elements of var tuple cursors (#22486)ringabout2023-08-161-1/+3
|
* use strictdefs for compiler (#22365)ringabout2023-08-061-1/+5
| | | | | | | | | | | | | | | * wip; use strictdefs for compiler * checkpoint * complete the chores * more fixes * first phase cleanup * Update compiler/bitsets.nim * cleanup
* fix set op related to {sfGlobal, sfPure} (#22393)Bung2023-08-061-1/+1
|
* fix #15005; [ARC] Global variable declared in a block is destroyed too… ↵Bung2023-08-061-1/+2
| | | | | (#22388) * fix #15005 [ARC] Global variable declared in a block is destroyed too early
* implement `ensureMove` (#22339)ringabout2023-07-291-3/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* fixes #22132; hoisted openArray params result in erroneous code (#22224)ringabout2023-07-051-1/+4
|
* allow destructors to accept non var parameters; deprecate `proc =destroy(x: ↵ringabout2023-06-211-2/+6
| | | | | | | | | | 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 #22058; invalid free with {.noSideEffect.} in template (#22088)ringabout2023-06-131-20/+19
|
* fixes overriden typo (#22044)ringabout2023-06-081-2/+2
|
* infer error for `=dup` if there is a custom `=copy` error hook (#22004)ringabout2023-06-051-1/+10
|
* lift the `=dup` hook (#21903)ringabout2023-06-021-11/+7
| | | | | | * fixes tests again * remove helper functions * fixes closures, owned refs * final cleanup
* fixes #21974; fixes sameConstant fieldDefect (#21981)ringabout2023-06-011-1/+1
| | | | | * fixes #21974; fixes sameConstant fieldDefect * add a test case
* improve `wasMoved` hooks; allow reset to use the overridden `wasMoved` hook ↵ringabout2023-05-121-1/+1
| | | | | | | (#21831) * improve `wasMoved` hooks * Because `wasMoved` is lifted
* adds documentation for `=wasMoved` and `=dup` hooks and small fixes (#21827)ringabout2023-05-111-1/+3
| | | | | | | | | | | * 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] (#21815)ringabout2023-05-111-2/+2
| | | | | | | | | | | | | * 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
* adds an experimental `mm:atomicArc` switch (#21798)ringabout2023-05-081-4/+4
|
* implement `=dup` hook eliminating `wasMoved` and `=copy` pairs (#21586)ringabout2023-05-061-5/+22
| | | | | | | | | | | | | | | | | | | * 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
* fixes #21703; moveOrCopy should consider when vm (#21721)ringabout2023-04-241-1/+2
|
* refactoring in preparation for better, simpler name mangling that wor… ↵Andreas Rumpf2023-04-241-3/+3
| | | | | | | | | | | (#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] (#21574)Andreas Rumpf2023-03-281-16/+33
| | | | | * fixes #20993 [backport:1.6] * proper line endings for the test file
* fix #18977; disallow change branch of an object variant in ORC (#21526)ringabout2023-03-161-12/+33
| | | | | | | | | | | * 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
* fixes #20139; hash types based on its path relative to its package path ↵ringabout2023-03-021-1/+1
| | | | | | | | | | | | | | | (#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 (#21303)ringabout2023-03-021-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Dont produce initing moves for sfNoInit variables in closure env (#21026)Yuriy Glukhov2022-12-051-1/+4
|
* Arc global (#20768)Bung2022-11-061-1/+1
| | | | | | | | | | | | | | | * 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" (#20764)ringabout2022-11-051-5/+2
| | | | | | | * Revert "fix arc global variable issues (#20759)" This reverts commit a3d32a4176539d0829a4e868f4b005a1a71eb7ee. * trigger documentation builds
* fix arc global variable issues (#20759)Bung2022-11-051-2/+5
| | | | | * temp * unsure
* fixes #20572 (#20585)Andreas Rumpf2022-10-171-37/+47
| | | | | * fixes #20572 * added a test case
* cleanup nfFirstWrite flags (#20500)Andreas Rumpf2022-10-051-1/+1
|
* [ARC] fixes #18645; C Compiler error when initializing {.global.} with a ↵ringabout2022-10-031-12/+17
| | | | | | | | | | 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>
* new move analyser2 (#20471)Andreas Rumpf2022-10-011-197/+136
| | | | | | | | * 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>
* store full definition AST for consts, fix noRewrite (#20115)metagn2022-09-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | * 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 for ORC (#20307) [backport]ringabout2022-09-081-2/+25
| | | fixes #20303; wasMoved expressions with side effects
* fixes the regressions caused by the fix for #20107 [backport] (#20287)Andreas Rumpf2022-08-311-1/+1
| | | | * fixes the regressions caused by the fix for #20107 [backport]
* removed caching logic; saves 400MB for an ORC booting compiler (#19989)Andreas Rumpf2022-07-091-8/+1
|
* move assertions out of system (#19599)flywind2022-03-231-0/+3
|
* fixes #18570 (#18599)Andreas Rumpf2021-07-271-2/+3
|
* fixes #18469 (#18544)Andreas Rumpf2021-07-201-5/+20
| | | | | * fixes #18469 * Update compiler/injectdestructors.nim
* fixes #18130 (#18407)Andreas Rumpf2021-07-011-1/+1
|
* followup #18362: make `UnusedImport` work robustly (#18366)Timothee Cour2021-06-271-4/+2
| | | | * warnDuplicateModuleImport => hintDuplicateModuleImport * improve DuplicateModuleImport msg, add test
* real bugfix for #17170 (#18171)Andreas Rumpf2021-06-041-0/+2
| | | | | * real bugfix for #17170 * better fix
* Rework DFA traversal (#18016)Clyybber2021-05-161-118/+108
| | | | | | | | | * enable using dbg: without a context * Optimally joining first write/last read analysis * Add test for #18002 * potLastReads -> potentialLastReads
* Fixes #17450 (#17477)Clyybber2021-03-231-0/+1
| | | | | * Fixes #17450 * Add missing test output
* Revert "Fixes #17450 (#17474)" (#17476)Clyybber2021-03-231-1/+0
| | | This reverts commit 5f0c52048970cb7449937bd19191638c9e9f0c8f.
* Fixes #17450 (#17474)Clyybber2021-03-231-0/+1
| | | | | * Fixes #17450 * Add missing test output
* IC: green tests (#17311)Andreas Rumpf2021-03-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * IC: renamed to_packed_ast module to ic module * IC: don't store the --forceBuild flag, makes it easier to test * IC: enable hello world test * Codegen: refactorings for IC; changed the name mangling algorithm * fixed the HCR regressions * life is too short for HCR * tconvexhull is now allowed to use deepCopy * IC exposed a stdlib bug, required a refactoring * codegen: code cleanups * IC: even if a module is outdated, its dependencies might come from disk * IC: progress * IC: better name mangling, module IDs are not stable * IC: another refactoring helping with --ic:on --gc:arc * disable arraymancer on Windows for the time being * disable arraymancer altogether * IC: make basic test work with 'nim cpp' * IC: progress on --ic:on --gc:arc * wip; name mangling for type info