summary refs log tree commit diff stats
path: root/compiler/sigmatch.nim
Commit message (Collapse)AuthorAgeFilesLines
* `proc` typeclass accounts for `iterator`, call conventions + `nil` fix + ↵metagn2023-04-111-5/+14
| | | | | | | | | | | | | document typeclass AST (#21629) * test fix #16546 #16548 + another issue * please don't tell me other packages do this * fix CI + test typeclass callconv pragma * better logic in parser * docs and changelog
* remove useVersion (#21626)metagn2023-04-081-1/+1
| | | test removing useVersion
* Use `analyseIfAddressTaken` logic for checking if address is taken in ↵Jake Leahy2023-03-201-2/+1
| | | | | | | | | | | | | | | | | | | converter (#21533) * Add a test case There are way more test cases (See all branches of analyseIfAddressTaken but this covers at least a second branch * Port analyseIfAddressTaken from semexprs to sigmatch This was done since we cannot import sem or semexprs (circular import) but we need the rest of the logic. In needs to be done here since the converter isn't semmed afterwards and so we can't just leave the process til later use the version from semexprs * Less hacky solution which has the checking be done in analyseIfAddressTakenInCall This was done instead of the recommendation on removing it since sfAddrTaken is used in places other than the backend * Remove weird whitespace * Still check nkHiddenAddr if we are checking a converter
* remove nosinks hacks from compiler (#21469)ringabout2023-03-041-1/+1
|
* Specify that address is taken when converter takes a var parameter (#21391)Jake Leahy2023-02-211-0/+1
| | | | | | | * Add test case * closes #21247 Add the sfAddrTaken flag to var parameters in converters This allows the JS backend to properly pass the parameter as a fat pointer
* fix typeRel of typeDesc (#21227)Bung2023-01-091-2/+6
|
* less verbose type mismatch messages (#21191)ringabout2022-12-281-17/+23
| | | | | | | | | * less verbose type mismatch messages * Update compiler/types.nim * fixes i386 * fixes i386
* Fix nimsuggest not suggesting fields in when theres static parameters (#21189)Jake Leahy2022-12-281-1/+1
| | | | | Don't check against empty arguments Add test case
* remove legacy code (#21134)ringabout2022-12-261-2/+0
| | | | | * remove legacy code * fixes
* fix #16541 (#21148)Bung2022-12-221-0/+2
|
* definite assignment analysis for let (#21024)ringabout2022-12-061-2/+5
| | | | | | | | | | | | | | | | | | | * draft for let daa * patch * fixes bugs * errors for global let variable reassignments * checkpoint * out param accepts let * add more tests * add documentation * merge tests
* deprecate `do:` meaning `do ():` + misc cleanup (#20927)metagn2022-12-061-0/+2
| | | | | | | | | | | | | | | | | * test disable do: block lambda lifting * fix last test [skip ci] * deprecate `do:` meaning `do ():` + misc cleanup closes https://github.com/nim-lang/RFCs/issues/486 * oops * fix * no idea what could be causing nimsuggest failure other than this * ensure ci works
* fix #20829 Regression in int64 type matching since (#21019)Bung2022-12-061-2/+4
| | | fix #20829 Regression in int64 type matching
* Revert "fixes #20883; Unspecified generic on default value segfaults the ↵ringabout2022-12-061-2/+1
| | | | | | | compiler" (#21028) Revert "fixes #20883; Unspecified generic on default value segfaults the compiler (#20917)" This reverts commit 10b6e4f5b4a119a8fa42f82a24ae7e4b08b2c103.
* fixes #20883; Unspecified generic on default value segfaults the compiler ↵ringabout2022-12-011-1/+2
| | | | | (#20917) test CI
* tyInt tyUint fit target int bit width (#20829)Bung2022-12-011-19/+28
|
* fix #13790; ptr char (+friends) should not implicitly convert to cstring ↵ringabout2022-11-241-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#20761) * fix =#13790 ptr char (+friends) should not implicitly convert to cstring * Apply suggestions from code review * first round; compiles on windows * nimPreviewSlimSystem * conversion is unsafe, cast needed * fixes more tests * fixes asyncnet * another try another error * last one * true * one more * why bugs didn't show at once * add `nimPreviewCstringConversion` switch * typo Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* fix #19149 Invalid codegen when returning var tuple from a template (#20762)Bung2022-11-061-2/+3
| | | | | * fix #19149 Invalid codegen when returning var tuple from a template * fix type
* fix #19700 Crash when passing a template to a generic functio… (#20567)Bung2022-10-151-0/+2
| | | fix nim-lang#19700 Crash when passing a template to a generic function expecting a procedure
* fix #7446 Generics: type mismatch 'SomeunsignedInt or Natural' (#20522)Bung2022-10-111-2/+1
| | | | | * fix #7446 Generics: type mismatch 'SomeunsignedInt or Natural' * try fix
* DAA and 'out' parameters (#20506)Andreas Rumpf2022-10-061-8/+19
| | | | | | | | | | | * DAA and 'out' parameters * progress * documented strictDefs and out parameters * docs, tests and a bugfix * fixes silly regression
* Markdown code blocks part 6 (#20292)Andrey Makarov2022-08-311-3/+2
|
* remove a special case in sigmatch; distinct pointer types no longer match ↵ringabout2022-08-231-2/+0
| | | | | | | | | | | | | | | | `nil` type (#20251) * remove a special case in sigmatch; distinct pointer types no longer match `nil` type * add tests * fixes tests * Update changelog.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* move assertions out of system (#19599)flywind2022-03-231-0/+3
|
* No longer segfault when using a typeclass with a self referencing type (#19467)Jason Beetham2022-02-021-1/+2
|
* Fixed concept constraints for static types (#19391)Jason Beetham2022-01-151-0/+9
|
* Generic parameters now can constrain statics in type definitions (#19362)Jason Beetham2022-01-141-2/+12
| | | | | | | | | * Parameters now can constrain static in type definitions resolved regression with generic procedures * Update compiler/sigmatch.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #19015 [backport:1.6] (#19204)Andreas Rumpf2021-12-041-1/+2
|
* implements https://github.com/nim-lang/RFCs/issues/407 (#18793)Andreas Rumpf2021-09-031-2/+12
|
* fixes #16325 [backport:1.4] (#18784)Andreas Rumpf2021-09-021-2/+1
|
* sigmatch: support optional params with last block arg(s) (#18631)Timothee Cour2021-08-201-1/+13
| | | | | | | * sigmatch: support optional params with last block arg * add tests * works with multiple block args * cleanup * address comment
* implements overloadable enum values; WIP (#18470)Andreas Rumpf2021-07-281-1/+1
| | | | | * implements overloadable enum values * simpler code
* fixes #18565 (#18593)Andreas Rumpf2021-07-271-1/+3
| | | * fixes #18565
* Make procedure mismatch more informative with pragma/call convention ↵Jason Beetham2021-07-061-31/+2
| | | | | | | | | | | | | | | | | | 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
* fixes #16270 (#18388)Andreas Rumpf2021-06-291-2/+7
|
* fix range to unsigned conversion (#17754)Tanguy Cizain2021-04-171-1/+1
|
* -d:nimDebug: calls doAssert false instead of quit (#17739)Timothee Cour2021-04-171-1/+1
|
* cString => cSourceString; tyCString => tyCstring so that error msgs show ↵Timothee Cour2021-04-171-5/+5
| | | | cstring, not cString (#17744)
* iterable[T] (#17196)Timothee Cour2021-04-111-8/+23
| | | | | | | | * 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
* `--nilseqs` is now a deprecated noop (#17211)Timothee Cour2021-03-011-8/+2
| | | | | * --nilseqs is now a deprecated noop * fix tests; fix: future => sugar
* new-style concepts implementation, WIP (#15251)Andreas Rumpf2021-02-241-5/+12
| | | | | | | | | | | | | * fixes #15210 [backport:1.2] * make tests green * make ordinal work * makes Swapable test compile * make Indexable example work * concepts: 'self' is now 'Self' * concepts: make Dictionary example compile * document the new concept implementation * concepts: make typeDesc work properly * concepts: allow documentation comments (d'oh)
* big steps torwards an efficient, simple IC implementation (#16543)Andreas Rumpf2021-01-021-5/+5
| | | | | | | | | | | | | | | | | | | * 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>
* [docs minor]space for code-block (#16266)flywind2020-12-061-1/+3
| | | | | | | | | * [docs minor]space for code-block * correct more errors * to runnableExamples * add newline
* rename: stmt -> typed and expr -> untyped (#15989)flywind2020-11-161-2/+2
| | | | | | | * stmt -> typed * expr -> untyped * minor
* Correct all eggs (#15906)Miran2020-11-101-2/+2
| | | | * "eg" is a misspelled "egg", "e.g." is "exempli gratia" * Also, "ie" is "i.e.".
* fix static[Slice[T]] as argument issue (#15842)cooldome2020-11-041-1/+1
|
* explicit ID generation for easier IC (#15559)Andreas Rumpf2020-10-251-7/+11
| | | | | | | | | | | | | | | | | * 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)
* sigmatch: hotfix [backport] (#15565)Andreas Rumpf2020-10-141-2/+2
|
* fix infinite recursion in typeRel (#15241)jcosborn2020-09-181-56/+59
| | | | | * fix generic constraints Co-authored-by: James Osborn <osborn@Jamess-MacBook-Pro.local>
* Big compiler Cleanup (#14777)Clyybber2020-08-281-33/+18
|