summary refs log tree commit diff stats
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
* 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]
* fixes #19078 [backport] (#19090)Andreas Rumpf2021-11-023-2/+6
|
* Fix VM's sametype impl to work for generics/typedescs (#19073)Jason Beetham2021-11-022-1/+7
| | | | | | | * Fix vm's sametype implementation to properly handle generics and typedescs * actually fixed sametype + have test * added comments and removed unsafe code
* [FIX] Do not break formatted string line (#19085) [backport]haxscramper2021-11-021-2/+1
| | | | | Otherwise, compiler produces broken error message - `$1` is not interpolated `Error: The $1 type doesn't have a default value. The following fields must be initialized: importGraph.`
* fix #18410 (Errors initializing an object of RootObj with the C++ backend) ↵flywind2021-10-311-1/+2
| | | | | | | | | | | | | [backport] (#18836) * fix #18410 * one line comment * typo * typo * cover cpp
* fix #18971 (#19070) [backport:1.6]Derek 呆2021-10-291-1/+1
| | | | since the example code return value from global variable, instead of first argument, the `n.len` is 1 which causes compiler crashes.
* docgen: implement doc link resolution in current module (#18642)Andrey Makarov2021-10-283-34/+188
|
* Fixed distinct composite type class proc borrowing (#18904)Jason Beetham2021-10-263-3/+24
| | | | | | | * Fixed composite type class proc borrowing * Moved borrow search into transf * added borrow check to symbol flag
* Fixed generic distinct conversions for 'var' (#18837)Jason Beetham2021-10-262-66/+80
| | | | | | | | | | | | | | | * SameTypeAux now properly traverses generic distincts * Smarter traversal of distincts * Removed redundant check * Fixed nkConv for jsgen * Added test for non distinct nkConv * using skiptypes for distinct now * Fixed genaddr for nkconv
* Add Zephyr Support (#19003)Jaremy Creechley2021-10-242-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Porting Nim to run on Zephyr. Includes changes to `std/net`. Squashed commit of the following: tweaking more memory / malloc things revert back bitmasks tweaking nim to use kernel heap as C malloc doesn't work fixing socket polling on zephyr cleanup getting maximum sockets for process or for rtos'es reorganizing and fixing net for async / system merge netlite changes back into nativesockets merge netlite changes back into nativesockets reverting native sockets back tweaking nim / zephyr network adding option to run 'net-lite' from linux bridging zephyr's max connections fixing net errors fixing compilation with getAddrString fixing compilation with getAddrString experimenting with a nativesockets_lite ... getAddrString experimenting with a nativesockets_lite ... getAddrString experimenting with a nativesockets_lite ... getLocalAddr experimenting with a nativesockets_lite ... getLocalAddr experimenting with a nativesockets_lite ... add note regarding incorrect FreeRTOS Sockadd_in fields changing to NIM_STATIC_ASSERT cleaning up the static_assert error messages cleaning up the static_assert error messages setting up static assert ftw! testing compile time asserts reworking Sockaddr objects to more closely match various platforms reworking Sockaddr objects to more closely match various platforms reworking Sockaddr objects to more closely match various platforms finding missing items (issue #18684) fixup posix constants (issue #18684) adding plumbing for zephyr os (issue #18684) adding plumbing for zephyr os (issue #18684) * fixing constant capitalizations * remove extra debug prints and fix TSa_Family/cint issue * remove extra debug prints and fix TSa_Family/cint issue * Porting Nim to run on Zephyr. Includes changes to `std/net`. Squashed commit of the following: tweaking more memory / malloc things revert back bitmasks tweaking nim to use kernel heap as C malloc doesn't work fixing socket polling on zephyr cleanup getting maximum sockets for process or for rtos'es reorganizing and fixing net for async / system merge netlite changes back into nativesockets merge netlite changes back into nativesockets reverting native sockets back tweaking nim / zephyr network adding option to run 'net-lite' from linux bridging zephyr's max connections fixing net errors fixing compilation with getAddrString fixing compilation with getAddrString experimenting with a nativesockets_lite ... getAddrString experimenting with a nativesockets_lite ... getAddrString experimenting with a nativesockets_lite ... getLocalAddr experimenting with a nativesockets_lite ... getLocalAddr experimenting with a nativesockets_lite ... add note regarding incorrect FreeRTOS Sockadd_in fields changing to NIM_STATIC_ASSERT cleaning up the static_assert error messages cleaning up the static_assert error messages setting up static assert ftw! testing compile time asserts reworking Sockaddr objects to more closely match various platforms reworking Sockaddr objects to more closely match various platforms reworking Sockaddr objects to more closely match various platforms finding missing items (issue #18684) fixup posix constants (issue #18684) adding plumbing for zephyr os (issue #18684) adding plumbing for zephyr os (issue #18684) * fixing constant capitalizations * remove extra debug prints and fix TSa_Family/cint issue * remove extra debug prints and fix TSa_Family/cint issue * fixing PR issues * Porting Nim to run on Zephyr. Includes changes to `std/net`. Squashed commit of the following: tweaking more memory / malloc things revert back bitmasks tweaking nim to use kernel heap as C malloc doesn't work fixing socket polling on zephyr cleanup getting maximum sockets for process or for rtos'es reorganizing and fixing net for async / system merge netlite changes back into nativesockets merge netlite changes back into nativesockets reverting native sockets back tweaking nim / zephyr network adding option to run 'net-lite' from linux bridging zephyr's max connections fixing net errors fixing compilation with getAddrString fixing compilation with getAddrString experimenting with a nativesockets_lite ... getAddrString experimenting with a nativesockets_lite ... getAddrString experimenting with a nativesockets_lite ... getLocalAddr experimenting with a nativesockets_lite ... getLocalAddr experimenting with a nativesockets_lite ... add note regarding incorrect FreeRTOS Sockadd_in fields changing to NIM_STATIC_ASSERT cleaning up the static_assert error messages cleaning up the static_assert error messages setting up static assert ftw! testing compile time asserts reworking Sockaddr objects to more closely match various platforms reworking Sockaddr objects to more closely match various platforms reworking Sockaddr objects to more closely match various platforms finding missing items (issue #18684) fixup posix constants (issue #18684) adding plumbing for zephyr os (issue #18684) adding plumbing for zephyr os (issue #18684) * fixing constant capitalizations * remove extra debug prints and fix TSa_Family/cint issue * remove extra debug prints and fix TSa_Family/cint issue * Remerge * fixing constant capitalizations * remove extra debug prints and fix TSa_Family/cint issue * remove extra debug prints and fix TSa_Family/cint issue * fixing PR issues * fix maxDescriptors on zephyr/freertos * move maxDescriptors to selector.nim -- fixes compile issue * change realloc impl on zephyr to match ansi c behavior * change realloc impl on zephyr to match ansi c behavior * force compileOnly mode for tlwip Co-authored-by: Jaremy J. Creechley <jaremy.creechley@wavebaselabs.com> Co-authored-by: Jaremy Creechley <jaremy.creechley@panthalassa.com>
* allow converting static vars to `openArray` (#19035)Etan Kissling2021-10-221-1/+1
| | | | | | | | | | | When assigning constant output to a seq, and then passing that static seq to other functions that take `openArray`, the compiler may end up producing errors, as it does not know how to convert `static[seq[T]]` to `openArray[T]`. By ignoring the `static` wrapper on the type for the purpose of determining data memory location and length, this gets resolved cleanly. Unfortunately, it is relatively tricky to come up with a minimal example, as there are followup problems from the failing conversion, e.g., this may lead to `internal error: inconsistent environment type`, instead of the relevant `openArrayLoc` error message.
* remove exception (#18906)flywind2021-10-221-7/+1
|
* Add Elbrus 2000 architecture (#19024)Danil Yarantsev2021-10-211-2/+4
| | | | | | | | | * Add Elbrus 2000 architecture * Add e2k to niminst * Update compiler/installer.ini Co-authored-by: Andreas Rumpf <rumpf_a@web.de>