summary refs log tree commit diff stats
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
* nvro don't touch cdecl types [backport: 1.6] (#19461)flywind2022-01-286-19/+33
| | | * nvro don't touch cdecl types; fix #19342 again
* support set other GCs after `mm = orc` or `mm = arc` is set in the global ↵flywind2022-01-271-20/+34
| | | | | | | | | config (#19455) * support set other GCs after arc/orc in global config fix #15535 * set before
* bugfix: varargs count as open arrays (#19447)Andreas Rumpf2022-01-251-1/+1
|
* New/better macro pragmas, mark some as experimental (#19406)metagn2022-01-202-116/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * New/better macro pragmas, make some experimental fix #15920, close #18212, close #14781, close #6696, close https://github.com/nim-lang/RFCs/issues/220 Variable macro pragmas have been changed to only take a unary section node. They can now also be applied in sections with multiple variables, as well as `const` sections. They also accept arguments. Templates now support macro pragmas, mirroring other routine types. Type and variable macro pragmas have been made experimental. Symbols without parentheses instatiating nullary macros or templates has also been documented in the experimental manual. A check for a redefinition error based on the left hand side of variable definitions when using variable macro pragmas was disabled. This nerfs `byaddr` specifically, however this has been documented as a consequence of the experimental features `byaddr` uses. Given how simple these changes are I'm worried if I'm missing something. * accomodate compiler boot * allow weird pragmas * add test for #10994 * remove some control flow, try remove some logic
* enable weave (#19363) [backport:1.6]flywind2022-01-201-2/+7
| | | | * enable weave * workaround CI
* Don't reject types directly on AST (#19407)metagn2022-01-191-2/+4
| | | | | | | Instead of rejecting type expressions based on node kind, evaluate the expression as a type. This is already the behavior for call results, and it has its own error for non-types, which is the same error you would normally get with 2 words swapped.
* fix term rewriting with sideeffect (#19410)flywind2022-01-191-2/+5
| | | | | | | | | * fix term rewriting with sideeffect fix #6217 * add tests * Update tests/template/template_various.nim
* Optimize lent in JS [backport:1.6] (#19393)hlaaftana2022-01-171-15/+36
| | | | | | | * Optimize lent in JS [backport:1.6] * addr on lent doesn't work anymore, don't use it * use unsafeAddr in test again for older versions
* add mm to compilesettings; deprecate gc (#19394)flywind2022-01-161-0/+1
|
* deprecate unsafeAddr; extend addr (#19373)flywind2022-01-162-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * deprecate unsafeAddr; extend addr addr is now available for all addressable locations, unsafeAddr is deprecated and become an alias for addr * follow @Vindaar's advice * change the signature of addr * unsafeAddr => addr (stdlib) * Update changelog.md * unsafeAddr => addr (tests) * Revert "unsafeAddr => addr (stdlib)" This reverts commit ab83c99c507048a8396e636bf22d55fdd84d7d1c. * doc changes; thanks to @konsumlamm Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Use openarray of bytes in md5 (#19307)hlaaftana2022-01-154-8/+299
| | | | | | | | | | * Use openarray of bytes in md5 * fix CI * cleanup * use noSideEffect for bootstrapping * fix CI again * actually fix CI by checking if it works * this is getting ridiculous * put old md5 version in compiler, remove vmop
* 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>
* nrvo shouldn't touch bycopy object[backport:1.2] (#19385)flywind2022-01-141-1/+1
| | | fix nim-lang#19342
* update copyright year (#19381)flywind2022-01-131-1/+1
|
* nimscript ignore the threads option (#19370)flywind2022-01-131-1/+1
| | | because nimscript doesn't support threads and causes troubles when the threads option is on
* bitsets.nim: cleanup (#19361)Andreas Rumpf2022-01-111-24/+11
|
* fix stylecheck error with asyncdispatch (#19350)flywind2022-01-101-1/+2
| | | | | | | | | | | | | | | | | | | | | * stylecheck usages part two: stdlib cleanup typeinfo.nim: importCompilerProc => importcompilerproc nre.nim: newLineFlags => newlineFlags system.nim: JSRoot => JsRoot ref #19319 * prefer importCompilerProc * fix stylecheck error with asyncdispatch it is a partial regression since #12842 * add tests * don't use echo in tests
* stylecheck usages part two: stdlib cleanup (#19338)flywind2022-01-081-1/+1
| | | | | | | | | | | | | * stylecheck usages part two: stdlib cleanup typeinfo.nim: importCompilerProc => importcompilerproc nre.nim: newLineFlags => newlineFlags system.nim: JSRoot => JsRoot ref #19319 * prefer importCompilerProc
* correct the comments (#19322)flywind2022-01-041-2/+2
| | | | | | | | | | | | | | | | | | --expandArc ``` var a b a = matrix(5, 5, 1.0) b = matrix(5, 5, 2.0) `=sink`(b, - let blitTmp = b wasMoved(b) blitTmp + a) `=destroy`(b) `=destroy`(a) ```
* Allow full commands and blocks in type sections (#19181)hlaaftana2022-01-021-9/+19
| | | | | | | * allow full commands and blocks in type sections * update grammar * fix changelog [skip ci] * more tests * even more tests
* fixes #16617 [backport] (#19300)Andreas Rumpf2021-12-311-0/+2
|
* fixes grammar typos [backport] (#19289)Andreas Rumpf2021-12-271-3/+3
|
* Fixed object field access of static objects in generics (#19283) [backport]Jason Beetham2021-12-231-1/+1
|
* Fix group reference (with capital letters (#19196)Andrey Makarov2021-12-201-1/+2
| | | in group name)
* added --nimMainPrefix switch; fixes #15955; refs #16945 [backport:1.6] (#19235)Andreas Rumpf2021-12-103-17/+22
|
* nimRawSetjmp: support Windows (#19197)Ștefan Talpalaru2021-12-101-1/+12
| | | | | | | | | | | | * nimRawSetjmp: support Windows Using `_setjmp()` directly is required to avoid some rare (but very annoying) exception-related stack corruption leading to segfaults on Windows, with Mingw-w64 and SEH. More details: https://github.com/status-im/nimbus-eth2/issues/3121 Also add "nimBuiltinSetjmp" - mostly for benchmarking. * fix for Apple's Clang++
* fixes an old ARC bug: the produced copy/sink operations don't copy the ↵Andreas Rumpf2021-12-095-2/+23
| | | | hidden type field for objects with enabled inheritance; fixes #19205 [backport:1.6] (#19232)
* Add support for LoongArch (#19223)wenghongquan2021-12-091-2/+3
| | | | | | | * Add support for LoongArch * Update compiler/installer.ini Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes a converter handling regression that caused private converters to leak ↵Andreas Rumpf2021-12-091-2/+4
| | | | into client modules; fixes #19213; [backport:1.6] (#19229)
* fix #19193 (#19195) [backport:1.2]Tanguy2021-12-071-2/+8
|
* allow `HSlice` bounded by constants of distinct types (#19219) [backport:1.2]Etan Kissling2021-12-061-8/+8
| | | | | | | | | When creating heterogenous slices of distinct types, the compiler does not initialize the internal type's `size` before accessing it. This then leads to this crash message: ``` compiler/int128.nim(594, 11) `false` masking only implemented for 1, 2, 4 and 8 bytes [AssertionError] ``` This patch initializes the `size` properly, fixing the problem.
* treat do with pragmas but no parens as proc (#19191)hlaaftana2021-12-051-3/+9
| | | fixes #19188
* fixes #19159 [backport:1.6] (#19210)Andreas Rumpf2021-12-041-3/+4
|
* fixes #19198 [backport:1.6] (#19209)Andreas Rumpf2021-12-042-14/+20
| | | | | * fixes #19198 [backport:1.6] * added a test case
* fixes #19015 [backport:1.6] (#19204)Andreas Rumpf2021-12-042-2/+4
|
* misc bugfixes [backport:1.2] (#19203)Andreas Rumpf2021-12-041-3/+3
|
* accept object type node from macros (#19179)hlaaftana2021-11-241-1/+1
|
* renamed 'gc' switch to 'mm'; [backport:1.6] (#19187)Andreas Rumpf2021-11-241-2/+2
| | | | * renamed 'gc' switch to 'mm'; [backport:1.6] * better docs
* parseExpr/parseStmt accept filename, fixes #13540 (#19182)hlaaftana2021-11-242-7/+6
|
* fix #12274 (#19180)hlaaftana2021-11-241-1/+1
|
* `caseStmtMacros` no longer experimental, experimental manual refactor (#19173)hlaaftana2021-11-232-5/+5
| | | | | | | | | | | * `caseStmtMacros` no longer experimental, experimental manual refactor * Update doc/manual.rst * apply review suggestions * apply review Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Accept nnkTypeSection from typedef macro pragmas (#19168)hlaaftana2021-11-221-5/+13
|
* fix marshal bugs in VM (#19161) [backport:1.6]flywind2021-11-171-2/+2
|
* fixes #19051 [backport:1.6] (#19133)Andreas Rumpf2021-11-121-2/+17
|
* fixes #14470 [backport:1.2] (#19115)Andreas Rumpf2021-11-091-1/+2
|
* fixes #19011 [backport:1.6] (#19114)Andreas Rumpf2021-11-091-1/+1
|
* fixes #19013 [backport:1.6] (#19111)Andreas Rumpf2021-11-093-8/+24
| | | | | * fixes #19013 [backport:1.6] * added test case
* change os.nim doc links to new style (#19102)Andrey Makarov2021-11-081-0/+7
|
* fixes another effect inference bug [backport:1.6] (#19100)Andreas Rumpf2021-11-071-0/+3
| | | | * fixes another effect inference bug [backport:1.6]