summary refs log tree commit diff stats
path: root/compiler/injectdestructors.nim
Commit message (Collapse)AuthorAgeFilesLines
* 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
* semLambda removed, semProcAux reworked (#17379)Saem Ghani2021-03-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * simplified proc-like name ident to symbol code * wip - reworking generic param sem * wip - closer to removing nkEmpty generic params * it's hacky but tests pass * slowly tweaking semProcAux to take on semLambda * fix pragma superset check proto vs current * Set the symbol owner earlier * partial progress reworking proto found bug where default values between forward and impl lead to overload resolution issues. * simplified pragma handling and callConv checks Co-authored-by: Clyybber <Clyybber@users.noreply.github.com> * partially working * cgexprs issue * It works! * comment clean-up * clean-up asserts, comments, and other bits * add isGenericParams, inline isGeneric queries * seeing if this is sufficiently consistent * can use this approach or continue it in a further PR * commentary about nullary generics and clean-ups * fixed a mistake in PNode isGenericRoutine * Some small cleanups * Small cleanup * for func lambdas ensure we use lambda pragmas * add some basic compileTime func tests * [ci skip] remove comments Co-authored-by: Clyybber <Clyybber@users.noreply.github.com> Co-authored-by: Clyybber <darkmine956@gmail.com>
* fixes #11225; generic sandwich problems; [backport:1.2] (#17255)Andreas Rumpf2021-03-091-1/+2
| | | | | * fixes #11225; generic sandwich problems; [backport:1.2] * progress * delegating these symbols must be done via 'bind'
* Fix #16437 (#17277)Clyybber2021-03-061-20/+22
| | | | | | | * Fix #16437 * Fix * Small cleanup
* Split last read and first write analysis (#17137)Clyybber2021-02-211-20/+42
| | | | | | | | * Split last read and first write analysis This improves performance by 10% for some cases. * Remove outdated comments
* ARC Analysis in one pass v3 (#17068)Clyybber2021-02-171-98/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Analyse last reads all at once * Integrate firstWrite analysis * Small cleanup * Use sets instead of seqs * Remove instrTargets * Reap the benefits * Implement error diagnostics * Operate on DFA index for lastRead analysis * Use mgetOrPut * Cache alias results This improves performance by a lot, since many CFG locations map to a single PNode * Improve performance * Improve performance * Cleanup * Fix #17025 * Grammar * Expand testcase
* Revert "ARC: Analysis in one pass v2 (#17000)" (#17046)Clyybber2021-02-151-98/+98
| | | This reverts commit 216be4060a853b3425501318537d598c4842eefc.
* ARC: Analysis in one pass v2 (#17000)Clyybber2021-02-101-98/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Analyse last reads all at once * Integrate firstWrite analysis * Small cleanup * Use sets instead of seqs * Remove instrTargets * Reap the benefits * Implement error diagnostics * Operate on DFA index for lastRead analysis * Use mgetOrPut * Cache alias results This improves performance by a lot, since many CFG locations map to a single PNode * Improve performance * Improve performance * Cleanup
* Revert "ARC Analysis in one pass (#16849)" (#16984)Clyybber2021-02-091-89/+95
| | | This reverts commit ab740cb5b9bfbacece26956fa2444763a790ccd1.
* ARC Analysis in one pass (#16849)Clyybber2021-02-091-95/+89
| | | | | | | | | | | | | | | | | | | * Analyse last reads all at once * Integrate firstWrite analysis * Small cleanup * Use sets instead of seqs * Remove instrTargets * Reap the benefits * Implement error diagnostics * Operate on DFA index for lastRead analysis * Use mgetOrPut
* Finer analysis for array access (#16787)Clyybber2021-01-241-2/+2
| | | | | * Refine the analysis for array access * Cleanup * Add comments
* IC: next steps (#16729)Andreas Rumpf2021-01-231-8/+8
| | | | | | | | | | | * IC: dead code elimination pass * preparations for a different codegen strategy * added documentation to the newly written code * IC: backend code * IC: backend adjustments * optimized the compiler a bit * IC: yet another massive refactoring * fixes regressions * cleanups
* Part-to-whole optimization (#16775)Clyybber2021-01-211-15/+16
|
* Reboot of #16195 (#16746)Clyybber2021-01-201-58/+85
| | | | | | | | | | | | | | | | | | | | | | | | | * fix #16185 * fix test * fix comment * fix comment * better approach * Add more tests and move sameLocation to injectdestructors * Better and more strict sameLocation * Small cleanup and preliminary spec clarification * Fix * Fix doc * Expand test Co-authored-by: Andrey R (cooldome) <ariabushenko@gmail.com>
* big steps torwards an efficient, simple IC implementation (#16543)Andreas Rumpf2021-01-021-3/+3
| | | | | | | | | | | | | | | | | | | * reworked ID handling * the packed AST now has its own ID mechanism * basic serialization code works * extract rodfiles to its own module * rodfiles: store and compare configs * rodfiles: store dependencies * store config at the end * precise dependency tracking * dependency tracking for rodfiles * completed loading of PSym, PType, etc * removed dead code * bugfix: do not realloc seqs when taking addr into an element * make IC opt-in for now * makes tcompilerapi green again * final cleanups Co-authored-by: Andy Davidoff <github@andy.disruptek.com>
* Revert "fix #16185 (#16195)" (#16197)Andreas Rumpf2020-11-301-60/+59
| | | This reverts commit bb4b27a2ca414f06fbb9d14ff76fa02a088ac141.
* fix #16185 (#16195)cooldome2020-11-301-59/+60
| | | | | | | | | | | * fix #16185 * fix test * fix comment * fix comment * better approach
* fixes #15076 (#16143)Andreas Rumpf2020-11-261-3/+5
| | | | | | | | | * fixes #15076 * heapqueue: optimized for ARC * added another test case [backport:1.4] * code cleanup
* ORC: prepare for another patent-pending optimization (#15996)Andreas Rumpf2020-11-181-2/+47
| | | | | | | | | | | | | | | | | * ORC: prepare for another patent-pending optimization * bugfix * '=copy' for refs can take a cyclic parameter for more ORC optimizations * ORC: exploit the common 'it = it.next' pattern * can't hurt to check for nil * use an algorithm that is not obviously broken * restore the test case * final cleanups for --gc:orc
* fix #15609 (#15856)cooldome2020-11-051-10/+9
| | | | | * fix #15609 * fix test
* explicit ID generation for easier IC (#15559)Andreas Rumpf2020-10-251-13/+14
| | | | | | | | | | | | | | | | | * refactoring: idents don't need inheritance * refactoring: adding an IdGenerator (part 1) * refactoring: adding an IdGenerator (part 2) * refactoring: adding an IdGenerator (part 3) * refactoring: adding an IdGenerator (part 4) * refactoring: adding an IdGenerator (part 5) * refactoring: adding an IdGenerator (part 5) * IdGenerator must be a ref type; hello world works again * make bootstrapping work again * progress: add back the 'exactReplica' ideas * added back the missing exactReplica hacks * make tcompilerapi work again * make important packages green * attempt to fix the build for 32 bit machines (probably need a better solution here)
* renamed '=' to '=copy' [backport:1.2] (#15585)Andreas Rumpf2020-10-151-2/+2
| | | | | | | | | * Assign hook name changed to `=copy` * Adapt destructors.rst * [nobackport] Duplicate tests for =copy hook * Fix tests * added a changelog entry Co-authored-by: Clyybber <darkmine956@gmail.com>
* fixes #15511 (#15524)Andreas Rumpf2020-10-081-1/+3
|
* fixes #15512 (#15521)Andreas Rumpf2020-10-081-1/+13
|
* Revert "fix #15035 (#15236)" (#15408)cooldome2020-09-241-3/+2
| | | This reverts commit f8c48fc1863a243718acf86b699baed1a5c1512e.
* Revert "Introduce explicit copy (#15330)" (#15346)Andreas Rumpf2020-09-161-1/+1
| | | This reverts commit a3e9cc52343a54cadc7b77b783e1c8b6ba2b327f.
* Introduce explicit copy (#15330)cooldome2020-09-161-1/+1
|
* fixes #15325 (#15340)Andreas Rumpf2020-09-161-1/+2
|