summary refs log tree commit diff stats
path: root/compiler/injectdestructors.nim
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Fix #15286 (#15292)cooldome2020-09-101-0/+3
| | | | | * fix #15286 * fix spacing
* Big compiler Cleanup (#14777)Clyybber2020-08-281-3/+3
|
* fix #15035 (#15236)cooldome2020-08-281-2/+3
|
* cursor and mutation tracking fixes (#15113)Andreas Rumpf2020-07-301-2/+2
| | | | | | | | * fixes #15110 * fixes #15096 * prepare varpartitions for cursor inference * new cursor inference begins to work * make tests green
* fixes #15076 (#15095)Andreas Rumpf2020-07-271-13/+20
|
* fixes a closure iterator memory leaks, progress on #15076Araq2020-07-271-1/+1
|
* fixes #15038 [backport:1.2]Andreas Rumpf2020-07-261-46/+1
|
* fixes #15036Andreas Rumpf2020-07-231-2/+0
|
* arc: cursors for simple for loop variables (#15008)Andreas Rumpf2020-07-171-1/+1
| | | | | * arc: cursors for simple for loop variables * merged devel
* Show that a variable is cursor in --expandArc (#15002)Clyybber2020-07-171-6/+5
|
* An optimizer for ARC (#14962)Andreas Rumpf2020-07-151-26/+28
| | | | | | | | | | | | | | | | | | | | * WIP: an optimizer for ARC * do not optimize away destructors in 'finally' if unstructured control flow is involved * optimized the optimizer * minor code cleanup * first steps to .cursor inference * cursor inference: big steps to a working solution * baby steps * better .cursor inference * new feature: expandArc for easy inspection of the AST after ARC transformations * added topt_cursor test * adapt tests * cleanups, make tests green * optimize common traversal patterns * moved test case * fixes .cursor inference so that npeg compiles once again * cursor inference: more bugfixes Co-authored-by: Clyybber <darkmine956@gmail.com>
* Fix #14985 (#14988)Clyybber2020-07-151-2/+2
|
* injectdestructors fixes and refactor (#14964)Clyybber2020-07-141-192/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | * injectdestructors fixes and refactor * Tiny cleanup * Refactor and expand testcase * Closes #14902 by adding testcase * Better naming * Fix test failures * Misc cleanup * Add testcase for #14968 * Better approach; expand testcases * Optimizations and fixes * Add testcase * typo * Tiny cleanup
* fixes a minor regressionAraq2020-07-101-1/+1
|
* fixes the tcontrolflow regression, clen idea of an escaping expressionAraq2020-07-101-20/+44
|
* no wasMoved() calls after destructors necessaryAraq2020-07-101-6/+6
|
* optimize sinks even when in a loopAraq2020-07-101-23/+12
|
* Move `wasMoved` out of `=destroy`Clyybber2020-07-101-5/+5
|
* CosmeticsClyybber2020-07-101-52/+51
|
* Make arc compile laser againClyybber2020-07-081-1/+1
|
* fixes #14900, this time for real, maybe (#14934)Andreas Rumpf2020-07-081-2/+8
|
* fixes #14900Araq2020-07-081-38/+42
|
* fixes #14899Araq2020-07-081-4/+37
|