summary refs log tree commit diff stats
path: root/compiler/semcall.nim
Commit message (Collapse)AuthorAgeFilesLines
* Fixed distinct composite type class proc borrowing (#18904)Jason Beetham2021-10-261-2/+11
| | | | | | | * Fixed composite type class proc borrowing * Moved borrow search into transf * added borrow check to symbol flag
* strict effects (#18777)Andreas Rumpf2021-09-021-0/+2
| | | | | | | | | | | | | | | | | * fixes #17369 * megatest is green for --cpu:arm64 * docgen output includes more tags/raises * implemented 'effectsOf' * algorithm.nim: uses new effectsOf annotation * closes #18376 * closes #17475 * closes #13905 * allow effectsOf: [a, b] * added a test case * parameters that are not ours cannot be declared as .effectsOf * documentation * manual: added the 'sort' example * bootstrap with the new better options
* fix a typo (#18715)flywind2021-08-191-1/+1
|
* improve `--declaredLocs` to help disambiguate types (generics, aliases etc) ↵Timothee Cour2021-07-081-7/+5
| | | | | | | | | (#18389) * improve --declaredlocs to help disambiguate types (generics, aliases etc) * avoid a cyclic deps * fix test after rebase
* Make procedure mismatch more informative with pragma/call convention ↵Jason Beetham2021-07-061-1/+7
| | | | | | | | | | | | | | | | | | mismatches (#18384) * Added more concise calling convention/pragma mismatch messages * Now only adds callConvMsg/lock message when sensible * Fixed message formatting * Added tests, and fixed some bugs * Tests joined, and always indenting * More tests and more bug fixes * Fixed first test in tprocmismatch * Using var param for writting mismatches * Better logic for handling proc type rel and conv/pragma mismatch * Refactored getProcConvMismatch * Fixed callConv message formatting * Fixed test for proper message * Cleanup to address issues * getProcConvMismatch now returns tuple, and reformatted code
* followup #17777: declaredloc field error msgs now work with generics (#18259)Timothee Cour2021-06-141-2/+3
| | | | | | | * followup #17777: declaredloc field error msgs now work with generics * fix tests * cleanup
* more informative error msg for undeclared field (`A(badfield: 1)` and ↵Timothee Cour2021-05-161-2/+13
| | | | `a.badfield = expr`) (#17777)
* iterable[T] (#17196)Timothee Cour2021-04-111-3/+7
| | | | | | | | * fix failing test toSeq in manual which now works * changelog * reject proc fn(a: iterable) * add iterable to spec * remove MCS/UFCS limitation that now works
* 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>
* fix #2844 #3911; add --spellsuggest to suggest symbols in scope with similar ↵Timothee Cour2021-03-161-0/+1
| | | | | | | spellings on undefined symbol error (#16067) * add --spellsuggest to suggest symbols in scope with similar spellings on undefined symbol errors * implement --spellsuggest with 0 arguments
* IC: next steps (#16729)Andreas Rumpf2021-01-231-2/+2
| | | | | | | | | | | * 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
* fix #16150 improve type mismatch errors (#16152)Timothee Cour2020-12-091-1/+1
| | | | | | | * fix #16150 improve type mismatch errors * allow -d:nimLegacyTypeMismatch * address comment
* Correct all eggs (#15906)Miran2020-11-101-1/+1
| | | | * "eg" is a misspelled "egg", "e.g." is "exempli gratia" * Also, "ie" is "i.e.".
* honor --declaredLocs in more places, including type mismatch errors; also ↵Timothee Cour2020-10-271-6/+3
| | | | | | | show `kind` with --declaredLocs (#15673) * honor --declaredLocs in more places, including type mismatch errors * fix tests * show declaration location also when type mismatch names clash
* explicit ID generation for easier IC (#15559)Andreas Rumpf2020-10-251-2/+2
| | | | | | | | | | | | | | | | | * 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)
* add --declaredlocs (#15666)Timothee Cour2020-10-211-6/+5
|
* fixes bootstrapping for any machine that has a Nim already installed ↵Andreas Rumpf2020-10-201-0/+7
| | | | [backport:1.4] (#15660)
* don't raise index defects on malformed ast (#15278)Andy Davidoff2020-09-071-3/+8
| | | | | * don't raise index defects on malformed ast * style
* Fix #5691 (#15158)Clyybber2020-08-271-4/+0
| | | | | | | | * Fix #5691 * Cleanup and thoughts * Use scope approach * Seperate defined/declared/declaredInScope magics * Fix declaredInScope * Update spec accordingly
* fixes #15056 [backport]Araq2020-07-241-2/+6
|
* minor bugfixes for 'func' and .borrowAraq2020-06-231-1/+2
|
* init checks and 'out' parameters (#14521)Andreas Rumpf2020-06-231-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
* fixes #14562Araq2020-06-051-1/+4
|
* Make ./koch temp --gc:arc work (#14186)Clyybber2020-05-011-1/+1
|
* changed type() to typeof() in docs and error messages (#14084)hlaaftana2020-04-241-1/+1
|
* DrNim (Nim compiler with Z3 integration) (#13743)Andreas Rumpf2020-03-311-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | * code cleanups and feature additions * added basic test and koch/CI integration * make it build on Unix * DrNim: now buildable on Unix, only takes 10 minutes, enjoy * added basic documentation for DrNim which can also be seen as the RFC we're following * drnim: change the build setup so that drnim.exe ends up in bin/ * makes simple floating point ranges work * added basic float range check * drnim: teach Z3 about Nim's range types plus code refactoring * drnim: make unsigned numbers work * added and fixed index checking under setLen * first implementation of .ensures, .invariant and .assume (.requires still missing and so is proc type compatibility checking * drnim: .requires checking implemented * drnim: implemented .ensures properly * more impressive test involving min() * drnim: check for proc type compatibility and base method compatibility wrt .requires and .ensures * testament: support for 'pattern <directory> * koch: uses new <directory> feature of testament * drnim: added tiny musings about 'old' * Make testament work with old SSL versions * koch: add support for 'koch drnim -d:release' * drnim: preparations for the param.old notation
* better error messages for Nim's effect systemAraq2020-03-221-0/+17
|
* fix #13538 sigmatch errors are now sorted (#13701)Timothee Cour2020-03-201-0/+7
| | | | | | | * fix #13538 sigmatch now sorted and has reliable order * re-enable tests that were disabled because of that bug * fix remaining tests and un-disable 2 other tests that were affected by this bug
* fix `is` with generic types; fix `genericHead(Foo[T])` (#13303)Timothee Cour2020-02-091-4/+0
| | | | | * fix #9855, fix #9855, fix genericHead * render TTypeKind via toHumanStr
* fixes #12148 [backport] (#12888)Andreas Rumpf2019-12-121-1/+1
|
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-59/+56
| | | | | | | | | | | | | | | | | | * 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
* [backport] Fix spelling typos (#12755)Brian Wignall2019-11-281-1/+1
|
* compiler/semcall: return the correct lineinfo for nkCallStrLit (#12484)alaviss2019-10-241-1/+2
|
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
|
* Small ast.nim cleanup (#12156)Clyybber2019-09-091-3/+3
| | | | | * Remove sonsLen * Use Indexable
* fixes #12024 (#12065)Andreas Rumpf2019-08-271-0/+8
|
* fixes #11942 (#11945)Arne Döring2019-08-141-1/+1
|
* [refactoring] compiler: simplified markUsedAndreas Rumpf2019-08-081-2/+2
|
* fix crash on sigmatch (#11913)Timothee Cour2019-08-081-0/+1
|
* revert changesAndrii Riabushenko2019-07-251-1/+1
|
* fixes #11826Andrii Riabushenko2019-07-251-1/+1
|
* fixes a 'nim check' regressionAraq2019-07-191-1/+1
|
* Merge branch 'devel' into araq-detect-unused-importsAndreas Rumpf2019-07-181-31/+31
|\
| * fix #8305 #7808 #10285 #11061 + other bugs with type mismatch error msgsTimothee Cour2019-07-081-31/+31
| |
* | [feature] detect unused importsAraq2019-07-171-2/+2
|/
* Replace countup(x, y-1) with x ..< yClyybber2019-05-071-3/+3
|
* fixes #10934Araq2019-03-311-0/+1
|
* Merge branch 'devel' into araq-quirky-exceptionsAndreas Rumpf2019-02-081-12/+31
|\
| * compiler: don't use 2 spaces in an error messageAraq2019-02-041-1/+1
| |
| * semcall: correct lineinfo for accquoted symbols (#10461)alaviss2019-01-271-1/+1
| |