summary refs log tree commit diff stats
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
* fixes booting warnings (#21711)ringabout2023-04-231-1/+1
| | | follow up https://github.com/nim-lang/Nim/pull/21604
* alias syntax fixes, improvements and tests (#21671)metagn2023-04-226-112/+118
| | | | | | | | | | | | | * alias syntax fixes, improvements and tests * even better, cannot use alias syntax with generics * more type tests, improve comment * fix again * consistent error message + make t5167_5 work * more comments, remove {.noalias.}
* implements #21620: allowing to import multiple modules with shared names ↵Juan M Gómez2023-04-213-8/+20
| | | | (#21628)
* tweak spellsuggest; three counts for equal distances candidates by default ↵ringabout2023-04-211-6/+3
| | | | | | | (#21700) * tweak spellsuggest; three counts for equal distances candidates * only suggest typos when length > 3
* fixes #21540; deref block at transf phase to make injectdestructors function ↵ringabout2023-04-192-15/+16
| | | | | | | | | | | | | properly (#21688) * fixes #21540; deref block at transf phase to make injectdestructors function properly * add a test case * add one more test * fixes the type of block * transform block
* import brackets support `as` and prefixes [backport] (#21636)metagn2023-04-181-12/+14
| | | | | | | * import brackets support `as` and prefixes fixes #21635 * copyTree -> copyNode
* actually fix #19015 (#21680)metagn2023-04-171-1/+3
| | | | | | | * actually fix #19015 * more tests * round out
* revert #21227 (#21681)metagn2023-04-171-6/+2
| | | | | | | | | * revert #21227 but keep test * add test for #21677 * don't export * delete test
* warn on set types bigger than max size, default to 0..255 for int literals ↵metagn2023-04-179-20/+31
| | | | | | | | | | | | | | | | | | | (#21659) * test implicitly huge set types refs https://github.com/nim-lang/RFCs/issues/298 * oh my god * boot at least * don't error, fix remaining issues, no 2 len arrays * fix runnable example * test assuming 0..255 for int literal * test refactor, add changelog, test
* compiler/docgen: pass --path:… to runnableExamples (#21669)Emery Hemingway2023-04-171-2/+5
|
* fixes #21674; `lent` can be used in the fields or the cast type as a ↵ringabout2023-04-182-2/+4
| | | | | | | | | parameter (#21684) * fixes #21674; `lent` can be used in the fields or the cast type as a parameter * add a test case * fix the test
* fixes #20155; repr range with distinct types is broken in ORC (#21682)ringabout2023-04-171-0/+5
| | | fixes #20155; repr range with distinct types is broken with ORC
* fix small mistake from #21629 (#21672)metagn2023-04-171-2/+2
|
* change compile pragma to use mangled compile objects (#21678)Jaremy Creechley2023-04-171-2/+7
| | | change compile pragma to use mangle
* minor codegen bugfix (#21670)Andreas Rumpf2023-04-151-1/+1
|
* fixes #18146; fixes #19372; disable tlsEmulation on windows; static link ↵ringabout2023-04-141-1/+0
| | | | | | | pthreads with mingw (#21668) * fixes #18146; disable tlsEmulation on windows; static link libwinthreads DLL * whatever
* runnableExamples imports std/assertions by default (#21658)metagn2023-04-141-1/+3
| | | closes https://github.com/nim-lang/RFCs/issues/499
* make grammar a bit more honest (#21655)metagn2023-04-141-9/+10
| | | | | | | | | | | * test if expr parsing expr refs #19802 * in any case * just be honest * fix symbol/keyword issue too
* custom pragmas: correct error condition, remove outdated symkind whitelist ↵metagn2023-04-131-10/+18
| | | | | | | | | | | | | | | (#21653) * test not restricting custom pragma applied symbols fixes #21652 * fix other test * different patch * fix tests * actually test #18212 and other routines
* fixes #20900; Calling template through from generic function across module ↵ringabout2023-04-131-0/+1
| | | | | | | fails to build (#21649) * fixes #20900; Calling template through from generic function across module fails to build * sanother way
* set module symbol type to None instead of nil for discard check (#21657)metagn2023-04-132-12/+19
| | | | | | | * set module symbol type to None instead of nil fixes #19225 * alright
* fixes #21632; enforce deref for `wasMoved` in ORC (#21647)ringabout2023-04-122-5/+5
| | | fixes #21632; enforce deref for `wasMoved`
* int64/uint64 as bigint in JS (#21613)metagn2023-04-113-27/+189
| | | | | | | | | | | * int64/uint64 as bigint in JS * fix CI * convert to compile option * fix lie * smaller diff, changelog entry
* fix #15691 (#21623)metagn2023-04-111-2/+0
| | | `semProcAux` has a check for `checkMinSonsLen(n, bodyPos + 1)`
* `proc` typeclass accounts for `iterator`, call conventions + `nil` fix + ↵metagn2023-04-115-23/+37
| | | | | | | | | | | | | 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
* fixes booting warnings (#21583)ringabout2023-04-104-6/+3
|
* remove useVersion (#21626)metagn2023-04-085-33/+6
| | | test removing useVersion
* `for` loop expression can now have generated `iterator`'s called (#21627)Jason Beetham2023-04-081-1/+2
| | | A for expression now can have a generated iterator, allowing for more composable iterables
* fixes #21617; createTypeBoundOps with PContext in order to instantiate ↵ringabout2023-04-074-12/+20
| | | | | | | generics (#21619) * fixes #21617; createTypeBoundOps with PContext in order to instantiate generics * keep idgen
* fix #19430 (#21603)metagn2023-04-061-2/+3
|
* warn against `a, b = val` in routine arguments (#21604)metagn2023-04-062-0/+12
| | | closes https://github.com/nim-lang/RFCs/issues/480
* Fix nim doc crash with group referencing & include (#21600)Andrey Makarov2023-04-021-6/+11
| | | | | | | This fixes a regression introduced in #20990 . When a group referencing is used and one of the overloaded symbols is in `include`d file, then `nim doc` crashes. The fix is in distinguishing (the index of) module and file where the symbol is defined, and using only module as the key in hash table for group referencing.
* fixes #21592; create type bound operations for calls in the method ↵ringabout2023-04-013-6/+10
| | | | | | | dispatcher for ORC (#21594) * fixes #21592; create type operations for the method dispatcher * add a test case
* hopefully easier to understand error message (#21585)Andreas Rumpf2023-03-301-2/+2
|
* document general use of `_`, error message, fixes (#21584)metagn2023-03-302-16/+24
| | | | | | | | | | | | * document general use of `_`, error message, fixes fixes #20687, fixes #21435 Documentation and changelog updated to clarify new universal behavior of `_`. Also new error message for attempting to use `_`, new tests, and fixes with overloadable symbols and implicit generics. * add test for #21435
* remove `seq[T]` `setLen` undefined behavior (#21582)tersec2023-03-291-1/+1
| | | remove seq[T] setLen UB
* Fix segfault caused by ensuring valueless statics are not evaluated (#21577)Jason Beetham2023-03-291-1/+1
|
* tuple unpacking for vars as just sugar, allowing nesting (#21563)metagn2023-03-284-90/+123
| | | | | | | | | | | | | | | | | | | * tuple unpacking for vars as just sugar, allowing nesting * set temp symbol AST * hopeful fix some issues, add test for #19364 * always use temp for consts * document, fix small issue * fix manual indentation * actually fix manual * use helper proc * don't resem temp tuple assignment
* fixes #20993 [backport:1.6] (#21574)Andreas Rumpf2023-03-281-16/+33
| | | | | * fixes #20993 [backport:1.6] * proper line endings for the test file
* fixes #21505 (overload resolution of explicit constructors for imported C++ ↵heterodoxic2023-03-272-5/+24
| | | | | types) (#21511) hacky attempt to reconcile default explicit constructors with enforcement of brace initialization, instead of memsetting imported objects to 0
* fixes #14255; Crash in compiler when using `system.any` by accident. (#21562)ringabout2023-03-231-1/+1
| | | fixes #14255; Crash in compiler when using system.any by accident.
* fixes #3770; templates with untyped parameters resolve private fields ↵ringabout2023-03-216-11/+33
| | | | | | | | | wrongly in generics (#21554) * fixes #3770; templates with untyped parameters resolve private fields wrongly * add a test case for #3770 * rename to `nfSkipFieldChecking`
* mitigates #21272; but it's not the final fix because the first round … ↵Andreas Rumpf2023-03-201-2/+2
| | | | | (#21462) mitigates #21272; but it's not the final fix because the first round of overload resolution should already match
* Use `analyseIfAddressTaken` logic for checking if address is taken in ↵Jake Leahy2023-03-202-11/+16
| | | | | | | | | | | | | | | | | | | 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
* Made generic type classes work with types using static parameters (#21528)Jason Beetham2023-03-171-4/+23
|
* add a prepass for codeReordering (#21513)ringabout2023-03-172-3/+33
| | | | | | | * add a prepass for codeReordering * simplify * fixes
* fix #18977; disallow change branch of an object variant in ORC (#21526)ringabout2023-03-162-13/+36
| | | | | | | | | | | * fix #18977 disallow change branch of an object variant in ORC * check errors for goto exception * fixes conditions * fixes tests * add a test case for #18977
* fixes #19857; Exception raised in closure may be "skipped" in ORC (#21530)ringabout2023-03-161-0/+1
| | | fixes #19857; Exception raised in closure may be "skipped"
* Optimize `cgen.addIndent` (#21508)Amjad Ben Hedhili2023-03-131-2/+6
| | | | | * Optimize `cgen.addIndent` * Avoid temporaries
* fixes explicit globals in macros (#21502)ringabout2023-03-121-1/+2
|