summary refs log tree commit diff stats
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
* fixes #21840; nested local template lookup regression (#21841)ringabout2023-05-121-7/+7
| | | | | | | * fixes #21840; nested local template lookup regression * use original types * fixes js vm tests
* make deprecated statement a no-op (#21836)metagn2023-05-126-55/+30
|
* cursor fields cannot form reference cycles (#21832)ringabout2023-05-111-9/+12
| | | | | | | * cursor fields cannot form a reference cycle * fixes typo * fixes position
* adds documentation for `=wasMoved` and `=dup` hooks and small fixes (#21827)ringabout2023-05-113-3/+5
| | | | | | | | | | | * adds documentation for `=wasMoved` and `=dup` hooks and small fixes * Update doc/destructors.md * Update doc/destructors.md --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* bring #21802 back; fixes #21753 [backport] (#21815)ringabout2023-05-116-26/+51
| | | | | | | | | | | | | * bring #21802 back; fixes #21753 [backport] * adds tests and multiple fixes * add test cases * refactor and remove startId * fixes custom hooks and adds tests * handle tyUncheckedArray better
* clean up SOME pending/xxx/issue link comments (#21826)metagn2023-05-114-21/+3
| | | | | * clean up SOME pending/xxx/issue link comments * great
* Remove LineTooLong (#21819)Juan Carlos2023-05-113-7/+1
| | | | | | | * LineTooLong refactor to make it actually useful * Improve error message * changelog wording * Fix typo
* fix #9423 followup #17594: distinct generics now work in VM (#21816)ringabout2023-05-101-3/+12
| | | | | | | | | * fix #9423 distinct generics now work in vm * fixes cpp tests --------- Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* ignore inline hint for dynlib procs in codegen [backport] (#21817)metagn2023-05-091-14/+14
|
* adds an experimental `mm:atomicArc` switch (#21798)ringabout2023-05-0818-44/+47
|
* fixes #21801; object field initialization with overloaded functions (#21805)ringabout2023-05-081-1/+1
| | | | | * fixes #21801; object field initialization with overloaded functions * use the correct type
* revert #21799 and #21802 which don't pass the tests (#21804)ringabout2023-05-071-6/+3
| | | | | | | | | * Revert "ORC: make rootsThreshold thread local [backport] (#21799)" This reverts commit b74d49c037734079765770426d0f5c79dee6cf87. * Revert "fixes #21752 [backport] (#21802)" This reverts commit d0c62fa169f3970653ce0d5bbd16e123efb24251.
* fixes #21280; Enum with int64.high() value crashes compiler (#21285)ringabout2023-05-061-1/+6
| | | | | | | | | | | | | | | * fixes #21280; Enum with int64.high() value crashes compiler * Update tests/enum/tenum.nim * Update tests/enum/tenum.nim * fixes tests * Update tests/enum/tenum.nim --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* implement `=dup` hook eliminating `wasMoved` and `=copy` pairs (#21586)ringabout2023-05-068-15/+89
| | | | | | | | | | | | | | | | | | | * import `=dup` hook eliminating `wasMoved` and `=copy` pairs * add dup * add a test for dup * fixes documentation * fixes signature * resolve comments * fixes tests * fixes tests * clean up
* some Token refactors (#21762)metagn2023-05-063-31/+26
| | | | | | | | | | | | | | | * test some Token refactors * fix CI * showcase for more reductions, will revert * Revert "showcase for more reductions, will revert" This reverts commit 5ba48591f4d53e8d83a27de8b03d26c6178dd3d1. * make line and column int32 * remove int32 change
* fixes #21753 [backport] (#21802)Andreas Rumpf2023-05-061-3/+6
|
* Fix some `styleCheck` bugs (#20095)quantimnot2023-05-062-6/+11
| | | | | | | | | | | refs #19822 Fixes these bugs: * Style check violations in generics defined in foreign packages are raised. * Builtin pragma usage style check violations in foreign packages are raised. * User pragma definition style check violations are not raised. Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* fixes #21704; remove nfIsRef for genLit in VM (#21765)ringabout2023-05-061-0/+1
| | | | | | | | | | | | | * fixes #21704; remove `nfIsRef` for genLit * remove nfIsRef from the output of macros * make the logic better * try again * act together * excl nfIsRef
* consistent use of scForceOpen for generic dot field symbols (#21738)metagn2023-05-051-11/+11
| | | | | | | | | | | | | | | | | | | | | * always force open generic dot field symbols? fixes #21724 but might break code * alternative, should fix CI * other alternative, add test for previous CI failure * not needed * make sure call doesn't compile too * ok actual second test * ok final actual correct test * apply performance idea * don't make fromDotExpr static
* amends #21690 to fix broken Nim to C++ source line mappings (#21784)heterodoxic2023-05-044-124/+125
| | | resync fork
* minor cleanup vmprofiler (#21783)ringabout2023-05-041-1/+1
|
* error on user pragma args (#21776)metagn2023-05-031-1/+5
| | | closes #20978
* underscore as special word (#21766)metagn2023-05-026-9/+10
| | | | | * underscore as special word * fix really hard to notice error
* cheap fix for #10853 + better tuple subscript error message (#21767)metagn2023-05-022-2/+5
| | | | | | | * cheap fix for #10853 * also better tuple subscript error message * weird
* fixes #19863; move sha1, md5 to nimble packages for 2.0 (#21702)ringabout2023-05-0211-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * move sha1, md5 to nimble packages * boot the compiler * fixes tests * build the documentation * fixes docs * lol, I forgot koch.nim * add `nimHasChecksums` define * clone checksums but maybe copying is better * bump nimble hash * use ChecksumsStableCommit * fixes tests * deprecate them * fixes paths * fixes koch
* implements #21747 (#21748)Juan M Gómez2023-05-022-28/+34
|
* fixes #21483; fixes nim doc skips documentation of annotated elements of ↵ringabout2023-04-291-1/+1
| | | | | | | | | objects (#21743) * fixes #21483; skipPragmaExpr * add a test case for #21483 * fixes HTML
* improve C/C++ debug output readability (1/N) (#21690)heterodoxic2023-04-284-129/+159
| | | | | * hacky attempt to reconcile default explicit constructors with enforcement of brace initialization, instead of memsetting imported objects to 0 * improve C/C++ debug output readability (1/N)
* handle quoted routine symbols and non symbols expressions as before (#21740)ringabout2023-04-281-2/+3
|
* fixes #21245; warn about destructors that can raise (#21726)Andreas Rumpf2023-04-262-1/+7
| | | | | | | | | * fixes #21245; warn about destructors that can raise * doc update * progress * typo
* fixes #21731; fixes #21537; disable `warnBareExcept` by default [backport] ↵ringabout2023-04-261-1/+1
| | | | | | | (#21728) * disable warnBareExcept for default * fixes a typo
* fix #21727 (#21729)metagn2023-04-262-12/+17
|
* Pragma to force the exportc of a type. #21645 (#21648)Juan M Gómez2023-04-241-3/+12
| | | | | exportc export all types not just those used by exported proc/globals Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #21703; moveOrCopy should consider when vm (#21721)ringabout2023-04-241-1/+2
|
* refactoring in preparation for better, simpler name mangling that wor… ↵Andreas Rumpf2023-04-2444-201/+215
| | | | | | | | | | | (#21667) * refactoring in preparation for better, simpler name mangling that works with IC flawlessly * use new disamb field * see if this makes tests green * make tests green again
* fix iterator equality + add test for proc equality + fix sameType (#21707)metagn2023-04-232-2/+6
| | | | | | | | | | | | | | | | | | | | | | | * fix iterator equality + add test also for procs fixes #21706 * all targets * and isNil and repr * separate overloads, fix sameType * more restricted sameType? * merge overloads again?? * remove sametype change for now * fix sameType anyway (CI failure was not related) --------- Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* 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