summary refs log tree commit diff stats
path: root/compiler/varpartitions.nim
Commit message (Collapse)AuthorAgeFilesLines
* fixes #20572 (#20585)Andreas Rumpf2022-10-171-4/+4
| | | | | * fixes #20572 * added a test case
* fixes #19986; mutable view from immutable location (#20134)ringabout2022-09-281-15/+24
| | | | | * fixes #19986; mutable view from immutable location * fixes the tests
* fixes #19457 seqs are not properly updated in loop with ARC/ORC (#19922)ringabout2022-09-281-0/+10
| | | | | | | | | * test CI * fixes #19457 * add comments Co-authored-by: sandytypical <43030857+xflywind@users.noreply.github.com>
* top-down type inference, implements rfc 149 (#20091)metagn2022-08-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * micro implementation of rfc 149 refs https://github.com/nim-lang/RFCs/issues/149 * number/array/seq literals, more statements * try fix number literal alias issue * renew expectedType with if/case/try branch types * fix (nerf) index type handling and float typed int * use typeAllowed * tweaks + const test (tested locally) [skip ci] * fill out more of the checklist * more literals, change @ order, type conversions Not copying the full call tree before the typedesc call check in `semIndirectOp` is also a small performance improvement. * disable self-conversion warning * revert type conversions (maybe separate op later) * deal with CI for now (seems unrelated), try enums * workaround CI different way * proper fix * again * see sizes * lol * overload selection, simplify int literal -> float * range, new @ solution, try use fitNode for nil * use new magic * try fix ranges, new magic, deal with #20193 * add documentation, support templates Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* dec inLoop after exiting the while scope in computeLiveRanges [backport] ↵flywind2022-06-291-1/+1
| | | | | | | (#19918) * dec inLoop after exiting the while scope in computeLiveRanges * add testcase
* move assertions out of system (#19599)flywind2022-03-231-0/+3
|
* fixes #19013 [backport:1.6] (#19111)Andreas Rumpf2021-11-091-7/+0
| | | | | * fixes #19013 [backport:1.6] * added test case
* fix #18971 (#19070) [backport:1.6]Derek 呆2021-10-291-1/+1
| | | | since the example code return value from global variable, instead of first argument, the `n.len` is 1 which causes compiler crashes.
* fixes #18287 (#18346)Andreas Rumpf2021-06-251-24/+24
|
* fixes #18320 (#18343)Andreas Rumpf2021-06-241-3/+5
| | | | | * TSymFlag has 47 flags already * fixes #18320
* fixes #15884 (#18230)Andreas Rumpf2021-06-101-1/+5
| | | | | * fixes #15884 * micro optimization
* view types: spec changes (#18226)Andreas Rumpf2021-06-101-2/+3
| | | | | | | | | | | | | * view types: spec changes * Update doc/manual_experimental.rst Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update doc/manual_experimental.rst Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* make strict funcs analysis smarter (#18219)Andreas Rumpf2021-06-091-36/+51
| | | | | | | * make strict funcs analysis smarter: varParam[i] = v is different from varParam[i][] = v * added a test case * Update compiler/varpartitions.nim Co-authored-by: Clyybber <darkmine956@gmail.com>
* ORC: cursor inference bugfix (#17973)Andreas Rumpf2021-05-081-2/+2
| | | | | * fixed a .cursor inference bug * added a test case
* 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'
* fixes #17033 [backport:1.4] (#17061)Andreas Rumpf2021-02-171-3/+19
| | | | | | | * fixes #17033 [backport:1.4] * make test robust against stdlib gensym things * cleanup assertions.nim to make topt_no_cursor easier to get right
* IC: next steps (#16729)Andreas Rumpf2021-01-231-13/+13
| | | | | | | | | | | * 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
* Nil type check implementation (#15287)Alexander Ivanov2020-12-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Nil checking * Enable current older not nil checking again, run new checking only under flag, skip our test * Enable tests, work on try/except and bugs, fix notnil tests * Enable strictNotNil tests (currently with lowercase category) and add some expected output * Work on try/except/finally: still some things unclear and a lot of code can raise out of try * Fix the notnil build by going back to the old version of a test which I shouldn't have changed * Fix test : use action compile * Work on mutation and aliasing: not finished * Render var parititions graph, try to understand it, fix a nilcheck if bug * Rebase, progress on working with partitions * Improve time logic * Fix some bugs, use graph indices instead of symbol in nil map * Fix bugs, test simpler ident aliasing for now, support two mutation levels * Support ContentMutation and ReAssignment: for now just detect possible re assignment for var parameters of calls * Enable several simple passing tests * Cleanup a bit, fix condition/branch infix-related bug * Remove some files, address some comments by Araq * Use internalError and no quit for now * Separate tests with expected warnings and with expected ok, fix a bug with if with a single branch related to copyMap * Fix new data structures, bugs: make tests pass, disable some for now * Work on fixing errors with non-sym nodes, aliasing: tests fail * Work on alias support: simple set-based logic, todo more tests and ref sets? * Use ref sets: TODO can we think of handle seq-s similar to varpartitions' Araq ones * Handle defers in one place, stop raising in reverse to make an async test compile with strictNotNil, add a commented out test * Dot expressions: call/reassignment. Other refactorings and distinct, SeqOfDistinct support. Checkout an older varpartitions * Work on field tracking * Backup : trying to fix bugs when running some stdlib stuff for running an async test * Start a section about strict not nil checking in experimental manual * Fix experimental strict not nil manual section and move it to another file based on Araq feedback * Fix unstructured flow and double warning problems, fix manual, cleanup * Fix if/elif/else : take in account structure according to Araq feedback * Refactor a bit * Work on bracket expr support, re-enable tests, clarify in manual/tests/implementation static index support for now * Work on compiling stdlib and compiler with strictNotNil * Small fixes to the manual for strictNotNil * Fix idgen for strict check nil rebase * Enable some simple tests, remove old stuff, comment out code/print * Copy the original varpartitions source instead of my changes * Remove some files
* Fix #15909 (#15914)Fanael Linithien2020-11-121-0/+1
|
* Fix 15629 (#15888)cooldome2020-11-091-10/+13
| | | | | | | | | | | * fix #15858 * fix space * fix #15629 * Revert "fix space" * Revert "fix #15858"
* fix #15756 (#15761)cooldome2020-10-281-1/+1
| | | | | * fix #15756 * simplify test
* ensure the Nim compiler works with --experimental:strictFuncs ↵Andreas Rumpf2020-10-261-1/+8
| | | | --experimental:views [backport:1.4] (#15737)
* fixes #15508 (#15509)Andreas Rumpf2020-10-071-6/+13
|
* implements https://github.com/nim-lang/RFCs/issues/258 (#15503)Andreas Rumpf2020-10-061-3/+2
| | | | | | | | | * implements https://github.com/nim-lang/RFCs/issues/258 * don't be too strict with custom pragma blocks * cast pragmas: documentation * added most missing inference query procs to effecttraits.nim
* views: yet another bugfix (#15447)Andreas Rumpf2020-10-011-4/+22
| | | | | | | * views: yet another bugfix * views: extended the spec * views: take into account potential hidden mutations via proc calls
* refactoring, fixes yet another strictFuncs regression (#15446)Andreas Rumpf2020-10-011-7/+13
|
* better support for view types (#15436)Andreas Rumpf2020-09-301-8/+46
| | | | | * you can put borrows into tables * enforces mutating views only mutate mutable data
* spec for view types (#15424)Andreas Rumpf2020-09-291-21/+175
| | | | | | | | | | | * spec for view types * spec additions * refactoring; there are two different kinds of views * refactorings and spec additions * enforce that view types are initialized * enforce borrowing from the first formal parameter * enforce lifetimes for borrowing of locals * typo in the manual * clarify in the implementation what a borrow operation really is
* cursor inference: makes combparser work; refactorings (#15411)Andreas Rumpf2020-09-261-68/+71
| | | | * cursor inference: makes combparser work; refactorings
* more precise borrow checking of 'result' (#15406)Andreas Rumpf2020-09-241-2/+7
|
* fixes #15361 (#15401)Andreas Rumpf2020-09-241-36/+131
| | | * fixes #15361; better cursor inference
* arc: =deepcopy fixesAraq2020-09-201-1/+0
|
* fixes #15325 (#15340)Andreas Rumpf2020-09-161-2/+11
|
* fixes #15147 (#15315)Andreas Rumpf2020-09-121-1/+1
|
* borrow checking refinements (#15290)Andreas Rumpf2020-09-091-2/+18
| | | * added basic borrowing test
* borrow checking (#15282)Andreas Rumpf2020-09-091-18/+18
| | | | | | | | | | | * refactoring: move procs to typeallowed.nim * frontend preparations for first class openArray support * prepare the code generator for first class openArray * code generation for first class openArray; WIP * code generation for open arrays, progress * added isViewType proc * preparations for borrow checking * added borrow checking to the front end
* strict funcs: use control flow information for a more precise analysis (#15271)Andreas Rumpf2020-09-061-20/+79
| | | | | * strict funcs: use control flow information for a more precise analysis * cursor inference uses control flow information
* fixes system.add for strict funcs (#15259)Andreas Rumpf2020-09-031-1/+1
| | | | | * fixes system.add for strict funcs * fixes #15248
* better strict funcs, WIP (#15199)Andreas Rumpf2020-08-181-5/+21
| | | | | * better strict funcs, WIP * progress
* fixes a collect() bug reported on the forum (#15156) [backport:1.2]Andreas Rumpf2020-08-041-1/+1
|
* fixes #15130 (#15141)Andreas Rumpf2020-08-011-1/+5
| | | | | * fixes #15130 * you really have to copy from cursors
* fixes #15111 (#15136)Andreas Rumpf2020-08-011-0/+2
|
* cursor and mutation tracking fixes (#15113)Andreas Rumpf2020-07-301-56/+239
| | | | | | | | * fixes #15110 * fixes #15096 * prepare varpartitions for cursor inference * new cursor inference begins to work * make tests green
* strict func: much better error messages (#15068)Andreas Rumpf2020-07-251-33/+73
| | | | | * strict func: much better error messages * documented the 'strict funcs' mode
* writing to a location counts as "side effect"; implements ↵Andreas Rumpf2020-07-251-0/+243
https://github.com/nim-lang/RFCs/issues/234 (#15030)