summary refs log tree commit diff stats
path: root/lib/system.nim
Commit message (Collapse)AuthorAgeFilesLines
* Add support for NuttX RTOS. (#21372)Century Systems2023-02-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | * Add support for NuttX RTOS. Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp> * lib: pure: asyncdispatch: assign to result. Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp> * lib: std: typedthreads: add support for parameters to adjust Thread Stack Size. Like FreeRTOS/Zephyr, add support for following configurations. -d:nimThreadStackSize=xxxxx -d:nimThreadStackGuard=yyyy Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp> --------- Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
* fixes #21195; `std/assertions` continue to use `sysFatal` when ↵ringabout2022-12-291-25/+3
| | | | | | | | | | | | | `nimPreviewSlimSystem` is not defined (#21196) * fixes #21195; `std/assertions` continue to use `sysFatal` * try includes * make `std/assertions` self-contained * fixes tests * fixes tests
* remove legacy code (#21134)ringabout2022-12-261-23/+12
| | | | | * remove legacy code * fixes
* remove misleading slimsystem deprecated warnings (#21156)metagn2022-12-221-3/+0
| | | refs #20967
* Document that system:pop() may raise IndexDefect (#21070)Xavier Noria2022-12-131-0/+2
| | | | | * Document system:pop() may raise IndexDefect * Add backticks to KeyError
* alternative, much simpler algorithm for strict func checking (#21066)Andreas Rumpf2022-12-111-2/+4
| | | | | | | | | | | | | * alternative, much simpler algorithm for strict func checking * forgot to git add new compiler module * new spec is incredibly simple to describe * fixes bigints regression * typos * closes #16305; closes #17387; closes #20863
* unpublic `arrayWith` and rename it to `nimArrayWith` (#21006)ringabout2022-12-041-1/+1
| | | | | * unpublic arrayWith * unindent
* tyInt tyUint fit target int bit width (#20829)Bung2022-12-011-6/+8
|
* move `system/atomics` out of system; `std/atomics` should be preferred (#20875)ringabout2022-11-221-13/+8
| | | | | | | | | | | | | * move `system/atomics` out of system; `std/atomics` should be preferred * add deprecation message * fixes * fixes * fixes * fixes more tests
* echo: only lock when threading is enabled (#20890)Tanguy2022-11-211-1/+2
|
* fixes strict effects (#20885)ringabout2022-11-211-1/+1
| | | | | | | * fixes strict effects * remove nosideeffect * Update lib/system/comparisons.nim
* rename `std/threads` to `std/typedthreads` (#20850)ringabout2022-11-161-3/+3
| | | | | | | | | * rename `std/threads` to `std/oldthreads` * fixes tests * rename to `typedthreads` * changelog
* fixes ptr to cstring warnings[backport] (#20848)ringabout2022-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix =#13790 ptr char (+friends) should not implicitly convert to cstring * Apply suggestions from code review * first round; compiles on windows * nimPreviewSlimSystem * conversion is unsafe, cast needed * fixes more tests * fixes asyncnet * another try another error * last one * true * one more * why bugs didn't show at once * add `nimPreviewCstringConversion` switch * typo * fixes ptr to cstring warnings[backport] * add fixes Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* remove name field for ARC (#20797)ringabout2022-11-091-1/+2
| | | | | | | | | | | | | * remove name field for ARC * mistake * improvement * better * typo * fixes a pre-existing bug
* implements display based subtype checking (6.4x faster without threads; 2.8x ↵ringabout2022-11-081-1/+3
| | | | | | | | faster with threads) (#20781) * WIP: fast 'of' operator based on the literature * implement display based subtype checking Co-authored-by: Araq <rumpf_a@web.de>
* fixes #20694; the `exit` function now takes `cint` type (#20775)ringabout2022-11-071-8/+7
|
* Export trace member of exception type to allow custom stack trace entries ↵Ico Doornekamp2022-11-071-2/+2
| | | | | (#20772) Added insertStackTraceEntry() proc to allow custom stack trace entries
* fixes pre-existing `quit` documentation regression [backport] (#20763)ringabout2022-11-061-3/+3
| | | fixes pre-existing `quit` documentation regression
* ref #20694; quit value gets saturated to ranges (#20753)ringabout2022-11-051-34/+65
| | | | | | | | | | | | | | | | | | | | | * quit value gets saturated to ranges * add documentation * minimal changes * refactor * small fix * add documentation * fixes * Update lib/system.nim Co-authored-by: Juan Carlos <juancarlospaco@gmail.com> Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
* revert #20719; relieve `std/assertions` of the `sysFatal` dep (#20743)ringabout2022-11-041-13/+8
| | | | | | | * Revert "make `system/fatal` importable (#20718)" This reverts commit d735c447d35948ef6fda8270d1665cbd66c4636a. * relieve `std/assertions` of the sysFatal dep
* make `system/fatal` importable (#20719)ringabout2022-11-011-2/+7
|
* removes channels_builtin when enabling `nimPreviewSlimSystem` (#20713)ringabout2022-10-311-1/+2
|
* put std/threads under the umbrella of nimPreviewSlimSystem (#20711)ringabout2022-10-311-3/+4
| | | | | | | | | | | * put `std/threads` under the umbrella of `nimPreviewSlimSystem` * add changelog * fixes tests * fixes tests again * fixes tests
* move threads out of system (#20674)ringabout2022-10-291-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * move syslocks first * progress * clean up * go on * clean up * clean up * add imports syslocks * remove documentation * public deallocOsPages * fixes genode * fixes more * fixes boehmGC * cover more cases * fixes cyclic deps * fixes genode * cleanup * unpublic fields * cleanup * clean up
* Added 'openArray[char]' overloads to 'std/parseutils' (#20527)Jason Beetham2022-10-241-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added 'openarray[char]' overloads to 'std/parseutils' * Removed redundant `start` and `last` params from slice using procs * Fixed type for parseIdent overload * fixed one by off with 'substr' * removed missed start parameters for procedures * Added 'openarray[char]' overloads to 'std/parseutils' * Removed redundant `start` and `last` params from slice using procs * Fixed type for parseIdent overload * fixed one by off with 'substr' * removed missed start parameters for procedures * Fixed VM op to work with new 'opcSlice' * Corrected captureBetween's logic to work with openarray * js sys's parsefloat logic now uses openarray Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* atomicInc global alloc counters (#20571)Antonis Geralis2022-10-161-8/+8
|
* fixes #19162; enable `strictEffects` for v2 (#19380)ringabout2022-10-151-1/+1
| | | | | | | | | | | | | | | | | | | * enable stricteffects * add gcsafe * fix tests * use func * fixes pegs tests * explicitly mark repr related procs with noSideEffect * add nimLegacyEffects * change URL * fixes docopt * add `raises: []` to repr * fixes weave * fixes nimyaml * fixes glob * fixes parsetoml * Apply suggestions from code review * Update testament/important_packages.nim * add legacy:laxEffects
* follow up #20109; remove `shallow` seqs/strings for ORC (#20502)ringabout2022-10-061-21/+22
| | | | | | | * remove `shallow` seqs/strings for ORC * add a changelog item * change url of DelaunayNim
* remove deprecation messages for `unsafeAddr`; add warnings to docs (#20496)ringabout2022-10-041-13/+3
|
* add default field support for object in ARC/ORC (#20480)ringabout2022-10-041-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fresh start * add cpp target * add result support * add nimPreviewRangeDefault * reduce * use orc * refactor common parts * add tuple support * add testcase for tuple * cleanup; fixes nimsuggest tests * there is something wrong with cpp * remove * add support for seqs * fixes style * addd initial distinct support * remove links * typo * fixes tuple defaults * add rangedefault * add cpp support * fixes one more bugs * add more hasDefaults * fixes ordinal types * add testcase for #16744 * add testcase for #3608 * fixes docgen * small fix * recursive * fixes * cleanup and remove tuple support * fixes nimsuggest * fixes generics procs * refactor * increases timeout * refactor hasDefault * zero default; disable i386 * add tuples back * fixes bugs * fixes tuple * add more tests * fix one more bug regarding tuples * more tests and cleanup * remove messy distinct types which must be initialized by original types * add tests * fixes zero default * fixes grammar * fixes tests * fixes tests * fixes tests * fixes comments * fixes and add testcase * undo default values for results Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
* pragma for sfCallsite instead of name check + better semantics, test (#20464)metagn2022-10-031-3/+6
| | | | | | | | | | | * pragma for sfCallsite instead of name check at every template definition Not documented because it seems to be for internal use? Should also make it possible to make comparisons and setops imports, but this doesn't have to be done. I can reuse a name like `cursor` for the pragma as well, added a new name just to be safe. * make sfCallsite recursive, add tests
* move widestrs out of system (#20462)metagn2022-10-011-2/+3
| | | | | * move widestrs out of system * fix osproc
* koch boot compiler with orc (#20467)ringabout2022-09-301-2/+2
| | | | | | | | | | | * koch boot compiler with orc * use orc * workaround bugs * move it * move the data
* moderate system cleanup & refactor (#20355)metagn2022-09-281-699/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * system refactor, move out 600 lines * compilation, slice, backwardsindex, misc_num moved out of system * some procs/types moved into arithmetics, basic_types * system no longer depends on syncio * some procs moved around to fit with their surroundings * make exceptions an import, old ops to misc_num * move instantiationInfo back * move back nim version, fix windows echo * include compilation * better docs for imported modules, fix unsigned ops also remove ze, ze64, toU8, toU16, toU32 with nimPreviewSlimSystem * fix terminal * workaround IC test & weird csize bug, changelog * move NimMajor etc back to compilation, rebase for CI * try ic fix * form single `indices`, slim out TaintedString, try fix IC * fix CI, update changelog, addQuitProc * fix CI * try fix CI * actually fix CI finally hopefully * Update lib/system/compilation.nim Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com> * update kochdocs * hopefully fix csize uses for slimsystem * fix tquit Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* follow up #19408; bump devel version and deprecated unsafeAddr (#20432)ringabout2022-09-281-2/+3
| | | bump devel version and deprecated unsafeAddr
* Revert "clarify that `char` may not be unsigned" (#20320)ringabout2022-09-081-1/+1
| | | | | Revert "clarify that `char` may not be unsigned (#20308)" This reverts commit f433d9cccf1a05da1a24e9fed9b914b7a2a35945.
* clarify that `char` may not be unsigned (#20308)ringabout2022-09-061-1/+1
|
* Markdown code blocks part 6 (#20292)Andrey Makarov2022-08-311-223/+235
|
* fixes nimPreviewSlimSystem; register echoBinSafe for nimPreviewSlimSystem ↵ringabout2022-08-241-0/+2
| | | | | | | (#20194) * register echoBinSafe * add output
* top-down type inference, implements rfc 149 (#20091)metagn2022-08-241-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * micro implementation of rfc 149 refs https://github.com/nim-lang/RFCs/issues/149 * number/array/seq literals, more statements * try fix number literal alias issue * renew expectedType with if/case/try branch types * fix (nerf) index type handling and float typed int * use typeAllowed * tweaks + const test (tested locally) [skip ci] * fill out more of the checklist * more literals, change @ order, type conversions Not copying the full call tree before the typedesc call check in `semIndirectOp` is also a small performance improvement. * disable self-conversion warning * revert type conversions (maybe separate op later) * deal with CI for now (seems unrelated), try enums * workaround CI different way * proper fix * again * see sizes * lol * overload selection, simplify int literal -> float * range, new @ solution, try use fitNode for nil * use new magic * try fix ranges, new magic, deal with #20193 * add documentation, support templates Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* add comments back (#20256)ringabout2022-08-211-0/+3
| | | My bad, I shouldn't have removed it in the precedent PR.
* remove the merge pragma and obsolete comments (#20254)ringabout2022-08-211-7/+4
| | | remove the merge pragma which has been deprecated for seven years
* Remove string == nil/nil == string error (#20222)metagn2022-08-201-23/+0
| | | | | | | * Remove string == nil/nil == string error This was to help migration for `nil` strings being removed, but `nil` strings have been gone for a while now. * remove isNil too
* improve deprecation error messages (#20197)ringabout2022-08-111-4/+2
|
* remove shallowCopy for ARC/ORC (#20070)ringabout2022-07-261-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | * remove shallowCopy for ARC/ORC * use move * fix * more fixes * typo * Update lib/system.nim * follow * add nodestroy * move * copy string * add a changelog entry Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #20015; document `shallowCopy` does a deep copy with ARC/ORC (#20025)flywind2022-07-141-0/+2
|
* move assertions out of system (#19599)flywind2022-03-231-2/+5
|
* apply changes from #18017 and some fixes (#19571)flywind2022-03-011-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * implements https://github.com/nim-lang/RFCs/issues/369 * 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> * merge * remove * fix bug Co-authored-by: Araq <rumpf_a@web.de> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* move io out of system (#19442)flywind2022-02-021-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Add noQuit option (#19419) [backport:1.6]Tom2022-01-191-2/+5
| | | | | | | | | * Add noQuit option * Add nim prefix in case of conflicts Co-authored-by: flywind <xzsflywind@gmail.com> Co-authored-by: flywind <xzsflywind@gmail.com>