Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Nil type check implementation (#15287) | Alexander Ivanov | 2020-12-29 | 1 | -0/+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 | ||||
* | Make `{.requiresInit.}` to work for distinct types (#15869) | Ivan Bobev | 2020-11-06 | 1 | -7/+14 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make `requiresInit` pragma to work for distinct types in addition to objects. Tagging of distinct types with `requiresInit` pragma was already supported, but its impact wasn't applied. Now its behavior when applied on distinct types is as follows. Given the following distinct type definitions: ```nim type DistinctObject {.requiresInit, borrow: `.`.} = distinct MyObject DistinctString {.requiresInit.} = distinct string ``` The following code blocks will fail to compile: ```nim var foo: DistinctFoo foo.x = "test" doAssert foo.x == "test" ``` ```nim var s: DistinctString s = "test" doAssert s == "test" ``` But these ones will compile successfully: ```nim let foo = DistinctFoo(Foo(x: "test")) doAssert foo.x == "test" ``` ```nim let s = "test" doAssert s == "test" ``` | ||||
* | Big compiler Cleanup (#14777) | Clyybber | 2020-08-28 | 1 | -2/+1 |
| | |||||
* | fixes #15111 (#15136) | Andreas Rumpf | 2020-08-01 | 1 | -19/+19 |
| | |||||
* | init checks and 'out' parameters (#14521) | Andreas Rumpf | 2020-06-23 | 1 | -1/+1 |
| | | | | | | | | | | | * I don't care about observable stores * enforce explicit initializations * cleaner code for the stdlib * stdlib: use explicit initializations * make tests green * algorithm.nim: set result explicitly * remove out parameters and bring the PR into a mergable state * updated the changelog | ||||
* | Fix tests/types/tparameterizedparent0 | Zahary Karadjov | 2020-04-01 | 1 | -1/+1 |
| | |||||
* | Turn some of the errors back into warnings | Zahary Karadjov | 2020-04-01 | 1 | -0/+5 |
| | |||||
* | Replace tfHasRequiresInit with a more accurate mechanism | Zahary Karadjov | 2020-04-01 | 1 | -22/+39 |
| | | | | | | | | | The new mechanism can deal with more complex scenarios such as not nil field appearing in a non-default case object branch or a field within a generic object that may depend on a when branch. The commit also plugs another hole: the user is no longer able to create illegal default values through seq.setLen(N). | ||||
* | More precise error messages for uninitialized fields in the presence of ↵ | Zahary Karadjov | 2020-04-01 | 1 | -35/+25 |
| | | | | inheritance | ||||
* | Turn the warning for uninitialized (result) variables into errors | Zahary Karadjov | 2020-04-01 | 1 | -2/+3 |
| | |||||
* | Plug another hole: default(T) forbidden for objects requiring initialization | Zahary Karadjov | 2020-04-01 | 1 | -0/+18 |
| | |||||
* | Don't allow 'var x: T' for objects that require initialization | Zahary Karadjov | 2020-04-01 | 1 | -36/+32 |
| | |||||
* | More sophistication; Allow requiresInit to be specified per-field | Zahary Karadjov | 2020-04-01 | 1 | -11/+21 |
| | |||||
* | First steps, the compiler can boot with enforced requiresInit | Zahary Karadjov | 2020-04-01 | 1 | -9/+4 |
| | |||||
* | ARC: optimize complete object constructors to use nimNewObjUninit | Araq | 2020-01-26 | 1 | -0/+3 |
| | |||||
* | Better case coverage error message for alias and range enum (#12913) | Jasper Jenkins | 2019-12-18 | 1 | -47/+9 |
| | |||||
* | Cosmetic compiler cleanup (#12718) | Clyybber | 2019-11-28 | 1 | -26/+26 |
| | | | | | | | | | | | | | | | | | | * Cleanup compiler code base * Unify add calls * Unify len invocations * Unify range operators * Fix oversight * Remove {.procvar.} pragma * initCandidate -> newCandidate where reasonable * Unify safeLen calls | ||||
* | refactoring: --newruntime consists of 3 different switches | Araq | 2019-10-20 | 1 | -1/+1 |
| | |||||
* | Fix spellings (#12277) [backport] | Federico Ceratto | 2019-09-27 | 1 | -1/+1 |
| | |||||
* | Consider range type of runtime discrim [feature] (#11432) | Oscar Nihlgård | 2019-08-20 | 1 | -16/+45 |
| | |||||
* | int128 on firstOrd, lastOrd and lengthOrd (#11701) | Arne Döring | 2019-08-07 | 1 | -1/+1 |
| | | | | * fixes #11847 | ||||
* | fixes #11585 | Andreas Rumpf | 2019-07-03 | 1 | -2/+3 |
| | |||||
* | fixes #11617 | Araq | 2019-07-01 | 1 | -0/+3 |
| | |||||
* | parameter runtime discriminators (#11397) | Jasper Jenkins | 2019-06-04 | 1 | -3/+6 |
| | | | | | * allow param for runtime discriminator construction | ||||
* | fix bool and range (#11336) | Jasper Jenkins | 2019-05-27 | 1 | -4/+6 |
| | |||||
* | Smarter variant object construction (#11273) | Jasper Jenkins | 2019-05-26 | 1 | -14/+93 |
| | |||||
* | special typing rules for owned pointers | Andreas Rumpf | 2019-03-04 | 1 | -2/+5 |
| | |||||
* | WIP: disallow 'nil' for strings and seqs | Andreas Rumpf | 2018-08-13 | 1 | -2/+2 |
| | |||||
* | refactoring: remove idents.legacy global variable and pass the IdentCache ↵ | Andreas Rumpf | 2018-05-27 | 1 | -3/+3 |
| | | | | around explicitly | ||||
* | sem pass compiles again | Andreas Rumpf | 2018-05-12 | 1 | -33/+29 |
| | |||||
* | more modules compile again | Andreas Rumpf | 2018-05-12 | 1 | -11/+11 |
| | |||||
* | fixes a regression about static object case variant checking | Araq | 2018-04-06 | 1 | -1/+3 |
| | |||||
* | further steps in implementing sink parameters; refs #7041 | Araq | 2018-03-30 | 1 | -1/+1 |
| | |||||
* | fixes #5450 | Andreas Rumpf | 2018-02-04 | 1 | -0/+4 |
| | |||||
* | preparations for language extensions: 'sink' and 'lent' types | Andreas Rumpf | 2018-01-07 | 1 | -2/+2 |
| | |||||
* | fixes #5999 | Araq | 2017-12-14 | 1 | -2/+8 |
| | |||||
* | work in progress: new implementation for 'a[^1]' | Andreas Rumpf | 2017-10-29 | 1 | -6/+9 |
| | |||||
* | deprecated unary '<' | Andreas Rumpf | 2017-10-29 | 1 | -5/+5 |
| | |||||
* | Fixes #5965 (#6237) | Daniil Yarancev | 2017-08-14 | 1 | -1/+6 |
| | |||||
* | move the object construction logic to a separate file | Zahary Karadjov | 2017-04-06 | 1 | -0/+292 |