summary refs log tree commit diff stats
path: root/lib/system
Commit message (Collapse)AuthorAgeFilesLines
* test removing dollar for objects out of system (#20242)metagn2022-08-241-40/+6
| | | | | | | | | | | * test removing dollar for objects out of system * test & fixes * fix bootstrap * use nimPreviewSlimSystem, test stdlib category * fix test
* bootstrap the compiler with nimPreviewSlimSystem (#20176)ringabout2022-08-091-0/+3
| | | | | * bootstrap the compiler with nimPreviewSlimSystem * threads
* update the docs of arc following up #19749 (#19752)ringabout2022-08-081-2/+2
| | | Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
* replace the broken link for ORC implementation with a working one (#20105)ringabout2022-07-311-1/+1
|
* Fixing `nimRawSetJmp` for vcc and clangcl on Windows (#19959)rockcavera2022-07-041-17/+21
| | | | | | | | | | | | | * fix vcc rawsetjmp * changing `_longjmp()` to `longjmp()` and `_setjmp()` to `setjmp()` * fix * fix setjmp to clangcl on Windows * fix genTrySetjmp() to clangcl on Windows
* Fix nimRawSetjmp for VCC [backport: 1.2] (#19899)Tanguy2022-06-201-1/+1
|
* Better range error messages (#19867)Tanguy2022-06-151-0/+3
| | | | | | | * Better range error messages * Revert to old behavior for arrays * Small corrections
* Windows: enable nimRawSetjmp by default [backport] (#19891)Tanguy2022-06-141-0/+7
| | | | | | | | | * Windows: enable nimRawSetjmp by default See #19197. The default setjmp can randomly segfault on windows * Attempt to disable the flag for bootstraping * Disable styleCheck for c_setjmp
* [js] add testcase for array indexDefect and remove todo (#19838)flywind2022-06-101-4/+0
| | | | | | | | | * remove unused opcSubstr * [js] add testcase for array indexDefect * Revert "remove unused opcSubstr" This reverts commit cb461f2545234d62c1e0b83318f3e5495c97de52.
* remove noop option `gc:v2` (#19810)flywind2022-06-101-12/+2
| | | | | * remove noop option gc:v2 * changelog
* fix #19862; make widestrs consistent between refc and orc (#19874) [backport]flywind2022-06-091-0/+3
| | | fix #19862; make widestrs consistent in refc and orc
* [Minor] remove unused and unnecessary local variable (#19853)flywind2022-06-011-1/+0
|
* Update nimscript `withDir` doc example (#19776)huantian2022-05-081-4/+4
|
* fixes #18612; apply cache and memcmp for methods in arc/orc (#19749)flywind2022-04-261-2/+26
| | | | | | | | | | | | | | | | | * try using endsWith * use memcmp * add cache * cleanup * better * minor * fix * improve test coverage for methods with ARC
* typetraits: add toSigned, toUnsigned (#18445)Timothee Cour2022-04-071-4/+2
| | | | | | | | * typetraits: add toSigned, toUnsigned * improve and add tests Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: flywind <xzsflywind@gmail.com>
* Deprecate selfExe (#19660)Juan Carlos2022-03-311-2/+1
| | | | | * Deprecate selfExe Nimscript * Deprecate selfExe Nimscript
* remove unnecessary framePtr code (#19645)flywind2022-03-251-1/+2
|
* Remove Deprecated Nimscript proc (#19629)Juan Carlos2022-03-231-8/+0
|
* move assertions out of system (#19599)flywind2022-03-235-115/+11
|
* system: thread: stack dealloction on Zephyr (#19633) [backport:1.6]Jaremy Creechley2022-03-221-2/+16
| | | Try to free the stack allocation when a thread exits. Possibly works for FreeRTOS as well.
* Update chcks.nim (#19540)rockcavera2022-02-171-1/+1
|
* fix #16458; make useNimRtl compile for --gc:orc (#19512)flywind2022-02-113-5/+7
| | | | | * fix #16458; make useNimRtl compile for --gc:orc/arc * fix tests
* move io out of system (#19442)flywind2022-02-021-963/+0
| | | | | | | | | | | | | | | | | | | | | | | | | * move io out of system * fix tests * fix tests * next step * rename to syncio * rename * fix nimscript * comma * fix * fix parts of errors * good for now * fix test
* added filemode docs (#19346)Smarcy2022-01-091-1/+4
|
* suggestion to respect typedarray type (#19257)Sven Keller2021-12-161-1/+27
| | | | | | | * suggestion to respect typedarray * Update jssys.nim Co-authored-by: Sven Keller <s.keller@cortona.de>
* nimRawSetjmp: support Windows (#19197)Ștefan Talpalaru2021-12-101-7/+39
| | | | | | | | | | | | * 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++
* Add support for LoongArch (#19223)wenghongquan2021-12-091-1/+3
| | | | | | | * Add support for LoongArch * Update compiler/installer.ini Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Atomic inc/dec should use ATOMIC_SEQ_CST (#19212)flywind2021-12-081-3/+3
|
* Making TCC work again on Windows --cpu:amd64 - fix #16326 (#19221)rockcavera2021-12-081-2/+16
| | | | | * fix #16326 * removing comments
* remove `sysspawn` which is dead code (#19218)flywind2021-12-061-187/+0
|
* [format minor] remove unnecessary spaces (#19216)flywind2021-12-061-5/+5
|
* make JS trunc polyfill opt-in, closes #16144 (#19183)hlaaftana2021-11-241-3/+3
|
* Implement threads on Zephyr (#19156)Jaremy Creechley2021-11-232-9/+27
| | | | | | | | | | | | | | | | | | | * pthreads setup for zephyr - enable tweak stack size - update lib/system/threads.nim - Fix int/uint in casting pointer. * add documentation and tweak flag names * add documentation and tweak flag names * fix configuration flag names * fix configuration flag names * cleanup Co-authored-by: Jaremy Creechley <jaremy.creechley@panthalassa.com>
* Enable customizing PageShift to set PageSize for embedded targets (#19129)Jaremy Creechley2021-11-161-3/+7
| | | | | | | | | | | | | | | | * Enable customizing PageSize (via PageShift). This enables adjusting PageSize for embedded targets without abusing cpu16. * copy nimPageXYZ settings for mmpaptest * add docs for Nim manual * add docs for Nim manual * docs tweaks Co-authored-by: Jaremy Creechley <jaremy.creechley@panthalassa.com>
* fixes .raises inference for newSeq builtin under --gc:orc [backport] (#19158)Andreas Rumpf2021-11-161-1/+1
|
* wrong spaces (3 => 2) (#19145)flywind2021-11-141-1/+1
|
* refactoring: orc can use getThreadId() (#19123)Andreas Rumpf2021-11-114-96/+110
| | | | | * refactoring: orc can use getThreadId() * progress
* fixes another effect inference bug [backport:1.6] (#19100)Andreas Rumpf2021-11-072-6/+9
| | | | * fixes another effect inference bug [backport:1.6]
* fixes #19000 (#19032)Andreas Rumpf2021-10-301-0/+6
| | | | | * fixes #19000 * progress
* Freeing critical sections via atexit in system/alloc and system/io (#19062)Tail Wag Games2021-10-292-4/+7
| | | | | | | | | | | | | | | * adding new system module sysexitprocs and including system exit procedures when registering exit handlers defined in userland * fixing failing tests and adding initialization guard to handle cases where the module's global init logic isn't invoked first as is the case with some gc implementaions * js backend shouldn't try to invoke actual system exit procs * fixing formatting in sysexitprocs.nim * 256 was too much - my max number of plugins in my engine is 64 and I require two hooks per runtime it looks like with tls emulation turned off, so for my purposes 128 should be sufficient * so atExit should be enough here, can get rid of all the extra cruft I had added on top since I didn't realize atExit already provided a stack * done being cute - since newruntime prevents correct cpp codegen for object variants apparently and breaks tests if I try to use std/exitprocs, ddSysExitProc is just going into both modules. Since system doesn't include system/io, polluting system with it doesn't make sense either... at least it is only importc'd when it is required in either module and we don't have to have any weird when defined(nimOwnedEnabled) with a comment explaining why
* deinitializing locks at program exit (#19043)Tail Wag Games2021-10-251-24/+32
| | | | | | | | | | | | * deinitializing locks at program exit * deinitLock shouldn't be called for js backend I guess... * I suppose this is the best way to detect the ewruntime option * I guess I need these guards here too... * fixing merge conflict
* Add Zephyr Support (#19003)Jaremy Creechley2021-10-245-15/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Add Elbrus 2000 architecture (#19024)Danil Yarantsev2021-10-211-1/+3
| | | | | | | | | * Add Elbrus 2000 architecture * Add e2k to niminst * Update compiler/installer.ini Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Removes deprecated {.injectStmt.}. Fixes #18666 (#18984)Dominik Picheta2021-10-131-10/+0
|
* fix code-block which causes missing docsflywind2021-09-111-2/+2
|
* fix for js strict mode (#18799)Sven Keller2021-09-041-4/+1
| | | | | | | | * Assignments, which would accidentally create global variables, instead throw an error in strict mode * Assignment to a getter-only property Co-authored-by: Sven Keller <s.keller@cortona.de>
* fixes #18494 (#18783)Andreas Rumpf2021-09-021-8/+34
|
* strict effects (#18777)Andreas Rumpf2021-09-022-4/+4
| | | | | | | | | | | | | | | | | * fixes #17369 * megatest is green for --cpu:arm64 * docgen output includes more tags/raises * implemented 'effectsOf' * algorithm.nim: uses new effectsOf annotation * closes #18376 * closes #17475 * closes #13905 * allow effectsOf: [a, b] * added a test case * parameters that are not ours cannot be declared as .effectsOf * documentation * manual: added the 'sort' example * bootstrap with the new better options
* improvements to `addInt` and `$` for integer types (#18592)Timothee Cour2021-08-194-79/+35
| | | | | | | | * improvements to $(SomeInteger) and addInt * remove mIntToStr, mInt64ToStr * improvements * fix tests/pragmas/tinjectstmt.nim; the diff is harmless, cgen code is identical with -d:danger or debug mode * rm tests/system/tstrmantle.nim * revert compiler/jsgen.nim for -d:nimVersion140
* fix #18702(fix `parseutils.parseFloat`) (#18703) [backport:1.0]flywind2021-08-161-4/+5
| | | | | * fix #18702 * Apply suggestions from code review