Timothee Cour
9b67e5c61b
jsonutils: support cstring (including as Table key); improve docs ( #16062 )
...
* jsonutils: support cstring (including as Table key); improve docs
* changelog
* un-disable a test now that #16061 was fixed
2021-03-31 18:24:39 +02:00
Dominik Picheta
65efa727ff
Removes asynchttpserver.getSocket. ( #17587 )
2021-03-31 18:20:42 +02:00
flywind
7c09e0c757
fix #15617(fix compilation failure on -d:useMalloc --gc:none) ( #17555 )
...
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-03-30 20:15:14 +02:00
Timothee Cour
72988509ba
add getPort to resolve Port(0) ( #17559 )
...
* add getPort to resolve Port(0)
* fixup
* use getPort in examples + tests
* address comments: do not re-export Port
2021-03-30 20:14:39 +02:00
rockcavera
af2a7e8cbc
Rotation right and left refactored to generics. Continuation of #16622 ( #17578 )
...
* Rotation right and left refactored to generics
Continuation of [16622](https://github.com/nim-lang/Nim/pull/16622 )
* add runnableExamples
2021-03-30 12:24:21 +02:00
Miran
40093b4a93
[backport:1.2] Avoid inlining of newObj and newObjRC1 calls ( #17582 )
...
This is taken from:
af69b3ceae
Full original comment:
This is to avoid heavy inlining happening when two allocation calls
would occur shortly after each other.
This inlining would sometimes be accompanied with an optimisation
as the compiler is able to see that cellToUsr ending the first
allocation call is shortly followed by an usrToCell call. The
pointer arithmetic is redundant and the compiler can eliminate it,
leaving only the cell address in a register (and later the stack)
instead of the actual pointer to the user data, as one would expect.
This combined with a GC collect cycle will cause the stack scan to
only notice the cell address, which is of no good due to a usrToCell
in the gcMark call which shifts that address to an adjacent cell.
This means that the actual cell of importance will not get marked
and thus cause a premature collection of that cell. BOOM.
2021-03-30 10:20:58 +02:00
Ardek Romak
9e88425d7c
Fix void async in templates ( #17562 )
...
* Fix https://github.com/nim-lang/Nim/issues/16159
* Add test for async in template
* Shorten the expression
* Even shorter
Co-authored-by: Clyybber <darkmine956@gmail.com >
2021-03-30 08:07:45 +02:00
Clyybber
a672ec3c9e
Fix #17299 , fix setAffinity for android ( #17574 )
...
* Fix #17299
* Comment
* Fix typo
2021-03-30 08:05:37 +02:00
Dylan Modesitt
35655cd189
Add hasDataBuffered to asyncnet ( #16000 )
...
Co-authored-by: flywind <xzsflywind@gmail.com >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-03-29 16:12:58 -07:00
flywind
1f1ef85eb0
[std/uri]fix #17481 ( #17568 )
2021-03-29 11:48:06 -07:00
Andrey Makarov
861c42c258
RST: enable parsing of prefix roles (ref #17340 ) ( #17514 )
2021-03-29 18:32:49 +02:00
flywind
7ad49950bd
[os:standalone]fix #14011 ( #17564 )
2021-03-29 17:54:28 +02:00
Andreas Rumpf
cfff27529e
added nkError to the AST ( #17567 )
...
* added nkError to the AST
* Update lib/core/macros.nim
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
* Update compiler/ast.nim
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
2021-03-29 16:23:19 +02:00
flywind
e2269f9216
[docs]fix #17473 ( #17565 )
...
* fix nim js cmp fails at CT
* Add `hasClosure` to `std/effecttraits`
* type
* Update changelog.md
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* fix #14011
* Delete ttypetraits.nim
* Apply suggestions from code review
* fix #17473
* Revert "fix #14011 "
This reverts commit 0eed97a84b .
* Update lib/system.nim
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
2021-03-29 14:39:49 +02:00
flywind
81e54c1d30
Add hasClosure to std/typetraits ( #17501 )
...
* fix nim js cmp fails at CT
* Add `hasClosure` to `std/effecttraits`
* type
* Update changelog.md
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update lib/std/effecttraits.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-03-29 14:22:29 +02:00
Timothee Cour
04520c0ce4
remove std/ prefix from doc/lib.rst now that canonical import is shown in module docs ( #17543 )
...
* remove std/ prefix from doc/lib.rst now that canonical import is shown in module docs
* cleanup top docs for std/sha1
2021-03-29 13:07:14 +02:00
Danil Yarantsev
89e0e0f27f
Small doc fixes in net ( #17566 )
2021-03-29 13:06:23 +02:00
Timothee Cour
8b26b3ad0d
remove docutils.nimble (not a real nimble package, and affected canonical imports) ( #17544 )
...
* remove docutils.nimble (not a real nimble package, and affected canonical imports)
* cleanup redundant references
2021-03-29 12:46:53 +02:00
konsumlamm
9e3960e83d
Small doc improvements for std/with ( #17556 )
2021-03-29 12:44:31 +02:00
ben
e45b1e3f36
Fix net.readLine infine loop #17534 ( #17535 )
...
* Fix net.readLine infine loop #17534
* fix #17534 add return to template
2021-03-29 11:24:15 +02:00
flywind
085580a2c8
fix #14010(fix std/registry + arc) ( #17551 )
...
* fix nim js cmp fails at CT
* fix #14010
* Update tests/stdlib/tregistry.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update tregistry.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-03-29 10:50:58 +02:00
Danil Yarantsev
b36182b0a4
Free the certificate after checking in checkCertName ( #17558 ) [backport:1.2]
...
* Fix small leak in checkCertName
* Size is not needed either
* Free the certificate after checking
2021-03-29 10:49:19 +02:00
flywind
e5be216ccb
[docs]close #12580 ( #17549 )
2021-03-28 20:21:27 -07:00
flywind
a36816fc04
follow up #17539 ( #17548 )
...
* fix nim js cmp fails at CT
* follow up #17539
2021-03-29 09:11:07 +08:00
Ardek Romak
207bcabdf2
Add a getter for all defined Sections in parsecfg ( #15450 )
2021-03-28 09:57:40 -07:00
ee7
eb3ed44009
system: fix link in delete proc ( #17550 )
...
The `delete` proc had a "See also" link that linked to itself.
2021-03-28 12:44:16 +02:00
rockcavera
b77a420d3e
set const arch64 to fix compiling with vcc/icc ( #17539 )
2021-03-28 13:11:51 +08:00
Timothee Cour
a65189a739
nnkArglist => nnkArgList + special case stylecheck:error ( #17529 )
...
* nnkArglist => nnkArgList
* special case stylecheck:error
2021-03-27 10:28:11 +01:00
Andreas Rumpf
3e03f67335
cleaned up the internal documentation ( #17524 )
2021-03-26 16:27:55 +01:00
flywind
8573160a44
lent support for tables ( #17505 )
2021-03-25 14:05:50 +01:00
Andrey Makarov
46364e63cd
fix RST parsing after option lists ( #17442 )
2021-03-25 08:15:05 +01:00
Timothee Cour
1590d14575
fix #17260 render \ properly in nim doc, rst2html ( #17315 )
2021-03-24 10:58:29 +01:00
Timothee Cour
e94aec20da
fix #17325 linux 32bit CI; fix #17085 flaky test ( #17469 )
2021-03-24 10:36:15 +01:00
flywind
c015ecdc37
fix #17490 ( #17491 )
2021-03-24 08:16:41 +01:00
flywind
28221e8a33
followup #16182 ( #17472 )
...
* fix nim js cmp fails at CT
* followup #16182
2021-03-23 20:18:36 +01:00
Timothee Cour
c27cd83265
remove {.compileTime.} for procs with NimNode: redundant because of tfTriggersCompileTime ( #17463 )
2021-03-23 02:51:21 -07:00
flywind
c719d79d23
add algorithm.merge ( #16182 )
...
* add merge to algorithm
* Apply suggestions from code review
* Update lib/pure/algorithm.nim
* Apply suggestions from code review
* Update changelog.md
Co-authored-by: ee7 <45465154+ee7@users.noreply.github.com >
2021-03-23 10:49:02 +01:00
Timothee Cour
d78ebe4a0e
fix #17454 ( #17461 )
2021-03-23 08:33:09 +01:00
Timothee Cour
4f9aaee1d9
remove redundant void return in stdlib ( #17464 )
2021-03-23 08:28:53 +01:00
flywind
c8dda867f2
close #11330 sets uses optimized countSetBits ( #17334 )
...
* Update lib/pure/bitops.nim
* Update lib/system/sets.nim
* Apply suggestions from code review
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-03-22 00:36:48 +01:00
Derek 呆
fd09ace557
prevent bitmasks double included in mmdist if -d:nimArcDebug added ( #17436 )
2021-03-21 14:29:39 +01:00
Juan Carlos
fb38d906a2
Improve jsre ( #17365 )
...
* Add dollar for regex
* Add dollar for regex
* Peer review feedbacks
* Peer review feedbacks
* Update lib/js/jsre.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update lib/js/jsre.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update lib/js/jsre.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Pear review
* Beer review
* Beer review
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-03-21 10:35:55 +01:00
Timothee Cour
05743bc9f7
improve jsutils docs ( #17421 )
...
* improve jsutils docs
* address comments
2021-03-21 10:35:00 +01:00
Danil Yarantsev
c5b109233a
Add documentation to the macrocache module ( #17431 )
...
* Add docs to macrocache
* use hint
* Use incl in the incl example
* add macrocache to lib
* consistency
* Update doc/lib.rst
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
* apply suggestions
* clarify the warning
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
2021-03-21 10:34:10 +01:00
ee7
b70e33f5bb
strutils: improve doc comments for replace funcs ( #17427 )
...
This commit fixes mispellings of "occurrence" introduced by:
- 76a3b350ce (#17337 )
- 8e8bea9044 (#17339 )
and adds the same "every occurrence of" in the `replaceWord` func.
Other changes:
- Prefer "replace with" to "replace by".
- Be more consistent with "the" - prefer "of the character" given that
we wrote "by the character".
- Try to be more consistent with writing the types - add
"the string `sub`" given that we wrote "the character `sub`".
2021-03-20 13:22:50 +01:00
konsumlamm
9997b42c35
Use importjs ( #17422 )
2021-03-19 14:22:48 -07:00
haxscramper
430c30299f
[FIX] use mixin for strscans.scanp ( #17371 )
2021-03-19 20:16:52 +01:00
Héctor M. Monacci
8e8bea9044
Clarify behaviour of char replace ( #17339 )
...
Clarify behaviour of char replace by adding ```every ocurrence of character```
2021-03-19 11:19:41 -07:00
flywind
e332c20ba7
follow up #17276 ( #17355 )
...
* improve test coverage for isolation
* a bit better
* rename channels to channels_builtin
* follow up #17276
* fix
* Update lib/std/private/jsutils.nim
2021-03-19 16:54:10 +01:00
Andreas Rumpf
6c1c8f51b3
IC: green tests ( #17311 )
...
* IC: renamed to_packed_ast module to ic module
* IC: don't store the --forceBuild flag, makes it easier to test
* IC: enable hello world test
* Codegen: refactorings for IC; changed the name mangling algorithm
* fixed the HCR regressions
* life is too short for HCR
* tconvexhull is now allowed to use deepCopy
* IC exposed a stdlib bug, required a refactoring
* codegen: code cleanups
* IC: even if a module is outdated, its dependencies might come from disk
* IC: progress
* IC: better name mangling, module IDs are not stable
* IC: another refactoring helping with --ic:on --gc:arc
* disable arraymancer on Windows for the time being
* disable arraymancer altogether
* IC: make basic test work with 'nim cpp'
* IC: progress on --ic:on --gc:arc
* wip; name mangling for type info
2021-03-19 16:53:38 +01:00