ringabout
f0f3904ff0
implement ensureMove ( #22339 )
...
* implement `ensureMove`
* use an additional flag
* improve some logics
* progress: fixes discard ensureMove
* forbids nested expressions
* improve error messages
* checkpoint
* fixes cursor
* ADD MORE TESTS
* fixes cursorinference again
* tiny cleanup
* improve error messages
* fixes docs
* implement comments add more tests
* fixes js
2023-07-29 10:57:03 +02:00
ringabout
11c8dfc9b3
fixes docs ( #22331 )
2023-07-26 10:04:34 +08:00
ringabout
7d9fe106ec
fixes #22268 ; fixes move codegen ( #22288 )
2023-07-19 12:57:58 +02:00
Juan Carlos
db1ce4ff12
Fix #22273 ( #22275 )
...
* Fix #22273
2023-07-14 12:40:57 +02:00
ringabout
1ad618d96c
clean up the documentation ( #22196 )
2023-07-02 22:36:05 +02:00
ringabout
e422b3c860
adds =destroy T support for strings and seqs ( #22167 )
...
* adds =destroy T support for strings and seqs
* fixes system
* fixes tests
2023-06-27 13:07:29 +02:00
ringabout
4546f5dfe5
adds T destructor for refs ( #22147 )
...
* adds T destructor for refs
* add `newRefdestructor`
* adds ref overload for destructors
* fixes config
2023-06-26 15:10:06 +02:00
ringabout
f524d60fa1
fixes #22123 ; Compiler bug with default initializer values and arrays ( #22128 )
2023-06-20 08:02:06 +02:00
ringabout
64b27edd3a
make move use =wasMoved internally ( #22032 )
...
* make `move` use `=wasMoved` internally
* fixes tests
* fixes spawn finally
* fixes views
* rename to internalMove
* add a test case
2023-06-09 15:53:12 +02:00
ringabout
0f3d6b5a52
small fixes for atomicArc ( #22017 )
...
* small fixes for atomicArc
* Update lib/system/arc.nim
2023-06-06 21:22:07 +02:00
ringabout
1133f20fe2
lift the =dup hook ( #21903 )
...
* fixes tests again
* remove helper functions
* fixes closures, owned refs
* final cleanup
2023-06-02 16:03:32 +02:00
ringabout
ddce555998
improve wasMoved hooks; allow reset to use the overridden wasMoved hook ( #21831 )
...
* improve `wasMoved` hooks
* Because `wasMoved` is lifted
2023-05-12 15:24:14 +02:00
ringabout
3b9999b93c
adds documentation for =wasMoved and =dup hooks and small fixes ( #21827 )
...
* 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 >
2023-05-11 19:38:27 +08:00
ringabout
055a00a6ef
make reset use the =destroy and wasMoved pair ( #21821 )
...
* make reset use the `=destroy` and `waMoved` pair
* fixes a space
* fixes `shrink` instead
* tiny fix
* fixes vm
* suppress the annotations since it breaks some important packages
2023-05-11 09:02:29 +02:00
ringabout
b562e1e6d8
implement =dup hook eliminating wasMoved and =copy pairs ( #21586 )
...
* 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
2023-05-06 21:36:57 +02:00
metagn
380dafcc32
fix iterator equality + add test for proc equality + fix sameType ( #21707 )
...
* 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 >
2023-04-23 17:43:59 +08:00
metagn
1bb117cd7a
proc typeclass accounts for iterator, call conventions + nil fix + document typeclass AST (#21629 )
...
* test fix #16546 #16548 + another issue
* please don't tell me other packages do this
* fix CI + test typeclass callconv pragma
* better logic in parser
* docs and changelog
2023-04-11 09:23:41 +02:00
Tomohiro
6ec9c7f683
Fix example code of proc add*[T](x: var seq[T], y: sink openArray[T]) ( #21607 )
...
* Fix example code in system.nim
* Add example code to lib/system.nim
* Fix compile error
* Fix example code that can be unsafe
2023-04-03 05:15:14 +02:00
Century Systems
3b9e9fd7b2
Add support for NuttX RTOS. ( #21372 )
...
* 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 >
2023-02-16 13:47:52 +01:00
ringabout
ebd1c678be
fixes #21195 ; std/assertions continue to use sysFatal when nimPreviewSlimSystem is not defined ( #21196 )
...
* fixes #21195 ; `std/assertions` continue to use `sysFatal`
* try includes
* make `std/assertions` self-contained
* fixes tests
* fixes tests
2022-12-29 14:15:08 -05:00
ringabout
f7c203fb6c
remove legacy code ( #21134 )
...
* remove legacy code
* fixes
2022-12-26 13:20:05 +01:00
metagn
37daed3897
remove misleading slimsystem deprecated warnings ( #21156 )
...
refs #20967
2022-12-22 09:54:41 +01:00
Xavier Noria
e4aadcf1c1
Document that system:pop() may raise IndexDefect ( #21070 )
...
* Document system:pop() may raise IndexDefect
* Add backticks to KeyError
2022-12-13 08:47:01 +01:00
Andreas Rumpf
3812d91390
alternative, much simpler algorithm for strict func checking ( #21066 )
...
* 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
2022-12-11 16:58:50 +01:00
ringabout
55373e65b4
unpublic arrayWith and rename it to nimArrayWith ( #21006 )
...
* unpublic arrayWith
* unindent
2022-12-04 15:39:14 +08:00
Bung
658b28dc57
tyInt tyUint fit target int bit width ( #20829 )
2022-12-01 13:34:00 +01:00
ringabout
09b7f90475
move system/atomics out of system; std/atomics should be preferred ( #20875 )
...
* move `system/atomics` out of system; `std/atomics` should be preferred
* add deprecation message
* fixes
* fixes
* fixes
* fixes more tests
2022-11-22 20:39:30 +01:00
Tanguy
19cc494b80
echo: only lock when threading is enabled ( #20890 )
2022-11-21 14:56:54 -05:00
ringabout
bce1f35f87
fixes strict effects ( #20885 )
...
* fixes strict effects
* remove nosideeffect
* Update lib/system/comparisons.nim
2022-11-21 14:55:13 -05:00
ringabout
e03a178bff
rename std/threads to std/typedthreads ( #20850 )
...
* rename `std/threads` to `std/oldthreads`
* fixes tests
* rename to `typedthreads`
* changelog
2022-11-16 16:35:20 +01:00
ringabout
06cd15663d
fixes ptr to cstring warnings[backport] ( #20848 )
...
* 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 >
2022-11-16 10:22:51 +01:00
ringabout
f11b7debf7
remove name field for ARC ( #20797 )
...
* remove name field for ARC
* mistake
* improvement
* better
* typo
* fixes a pre-existing bug
2022-11-09 16:22:55 +01:00
ringabout
7d15fdd375
implements display based subtype checking (6.4x faster without threads; 2.8x 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 >
2022-11-08 13:08:01 +01:00
ringabout
66b0c843c3
fixes #20694 ; the exit function now takes cint type ( #20775 )
2022-11-07 12:17:52 +01:00
Ico Doornekamp
0b4f502393
Export trace member of exception type to allow custom stack trace entries ( #20772 )
...
Added insertStackTraceEntry() proc to allow custom stack trace entries
2022-11-07 12:17:00 +01:00
ringabout
fc8bfd781a
fixes pre-existing quit documentation regression [backport] ( #20763 )
...
fixes pre-existing `quit` documentation regression
2022-11-06 11:50:10 +01:00
ringabout
d5cc2085ea
ref #20694 ; quit value gets saturated to ranges ( #20753 )
...
* 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 >
2022-11-05 10:58:57 +01:00
ringabout
12a20b9fb6
revert #20719 ; relieve std/assertions of the sysFatal dep ( #20743 )
...
* Revert "make `system/fatal` importable (#20718 )"
This reverts commit d735c447d3 .
* relieve `std/assertions` of the sysFatal dep
2022-11-04 09:53:19 +01:00
ringabout
d735c447d3
make system/fatal importable ( #20719 )
2022-11-01 07:56:32 +01:00
ringabout
0a1f204f0f
removes channels_builtin when enabling nimPreviewSlimSystem ( #20713 )
2022-10-31 16:56:05 +08:00
ringabout
e1ddd2d524
put std/threads under the umbrella of nimPreviewSlimSystem ( #20711 )
...
* put `std/threads` under the umbrella of `nimPreviewSlimSystem`
* add changelog
* fixes tests
* fixes tests again
* fixes tests
2022-10-31 06:36:50 +01:00
ringabout
1dab8ba334
move threads out of system ( #20674 )
...
* 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
2022-10-29 18:11:40 +02:00
Jason Beetham
ea0e45e62f
Added 'openArray[char]' overloads to 'std/parseutils' ( #20527 )
...
* 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 >
2022-10-24 14:50:54 -04:00
Antonis Geralis
ed26156c99
atomicInc global alloc counters ( #20571 )
2022-10-16 01:07:22 +02:00
ringabout
1e15f975b8
fixes #19162 ; enable strictEffects for v2 ( #19380 )
...
* 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
2022-10-15 14:07:40 +02:00
ringabout
723a71bd22
follow up #20109 ; remove shallow seqs/strings for ORC ( #20502 )
...
* remove `shallow` seqs/strings for ORC
* add a changelog item
* change url of DelaunayNim
2022-10-06 07:16:50 +02:00
ringabout
827971dab2
remove deprecation messages for unsafeAddr; add warnings to docs ( #20496 )
2022-10-04 17:05:11 +02:00
ringabout
f89ba2c951
add default field support for object in ARC/ORC ( #20480 )
...
* 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 >
2022-10-04 12:45:10 +02:00
metagn
2cca38d33c
pragma for sfCallsite instead of name check + better semantics, test ( #20464 )
...
* 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
2022-10-03 06:07:55 +02:00
metagn
0b1650576c
move widestrs out of system ( #20462 )
...
* move widestrs out of system
* fix osproc
2022-10-01 22:35:09 +02:00