summary refs log tree commit diff stats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Small privateAccess improvement (#17786)Clyybber2021-04-191-1/+1
|
* Rename `=` to `=copy` in stdlib (#17781)Clyybber2021-04-195-4/+5
|
* [std/locks]close #7998(complete condition variables) (#17711)flywind2021-04-195-45/+60
| | | | | | * close #7998 * workaround genode * Update lib/system/syslocks.nim
* [std/locks]remove workaround for withLock (#17772)flywind2021-04-191-4/+3
| | | | | | | | | | Ref #6113 and #6049 The workaround for generics instantiation is unnecessary. It seems to be fixed by another PR I guess. The test still works. So the changes should be harmless. https://github.com/nim-lang/Nim/blob/devel/tests/stdlib/tlocks.nim I also add some inline pragmas.
* Documentation only, dom (#17770)Juan Carlos2021-04-191-1/+3
| | | | | | | | | | | | | | * ReSync with Devel * ReSync * https://github.com/timotheecour/Nim/issues/674 * Update lib/js/dom.nim Co-authored-by: flywind <xzsflywind@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: flywind <xzsflywind@gmail.com>
* [std/rlocks]add inline pragma (#17773)flywind2021-04-191-3/+3
| | | so that it can be used as the base of new locks module with destructors.
* privateAccess now works with ref | ptr (#17760)Timothee Cour2021-04-191-1/+1
|
* Fix #17755 (#17766)Dankr4d2021-04-181-2/+11
| | | Signed-off-by: Dankr4d <dude569@freenet.de>
* fix #17749 ignore SIGPIPE signals, fix nim CI #17748 (#17752)Timothee Cour2021-04-181-3/+13
| | | | | * fix #17749 SIGPIPE * fix for windows
* IC exposes typedesc implementation shenanigans (#17759)Andreas Rumpf2021-04-181-1/+1
| | | | | | * IC exposes typedesc implementation shenanigans; so I change system.default's definition to what it should have been to begin with * Update lib/system.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* make cuchar alias uint8 instead of char (#17738)shirleyquirk2021-04-171-1/+1
|
* replace defer with try ... finally (#17753)flywind2021-04-171-5/+5
|
* cString => cSourceString; tyCString => tyCstring so that error msgs show ↵Timothee Cour2021-04-175-8/+8
| | | | cstring, not cString (#17744)
* Fix buffer-overrun bug in net (#17728) [backport:1.0]shirleyquirk2021-04-161-4/+3
|
* std/hashes: hash(ref|ptr|pointer) + other improvements (#17731)Timothee Cour2021-04-161-23/+49
|
* start using import {.all.} (#17736)Timothee Cour2021-04-161-22/+0
|
* `import foo {.all.}` reboot (#17706)Timothee Cour2021-04-161-0/+34
|
* make the copy operation of Thread an error (#17734)flywind2021-04-161-0/+2
|
* Fix array's high & low return type for empty arrays (#17705)Tanguy Cizain2021-04-151-0/+8
| | | | | | | | | * fix array.high/low return type * Add test for empty array low return type Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Fix getCustomPragmaVal for some multi arg pragmas (#17723)Clyybber2021-04-151-41/+45
| | | | | * Fix getCustomPragmaVal for some multi arg pragmas * Bootstrap fix
* rst indentation fixes (ref #17340) (#17715)Andrey Makarov2021-04-152-39/+74
|
* simplify asyncfutures, asyncmacro (#17633)Timothee Cour2021-04-142-72/+31
|
* getCustomPragma is split up in more usable chunks (#11526)Arne Döring2021-04-141-93/+165
| | | | | | | | | | | | | | | | | * getCustomPragma is split up in more usable chunks * changelog entry * fix for style checks * shitty typedesc special casing * Add since annotation and remove typedesc comments * Fix typo * Revert since annotation because it breaks bootstrapping * Export getCustomPragmaNode conditionally * Reduce code duplication * Update since * Update lib/core/macros.nim * Apply suggestions from code review Co-authored-by: Clyybber <darkmine956@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* callback cannot be nil (#17718)flywind2021-04-141-0/+1
| | | | | | | `Task.callback` cannot be nil, we need to raise it at debug and release mode Situations: - if users create a Task object without using `toTask` and invoke the Task - if users already move the Task and invoke the Task
* Update channels.nim (#17717)flywind2021-04-141-4/+4
|
* Remove the use of usrToCell in gcMark [backport:1.2] (#17709)zah2021-04-142-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove the use of usrToCell in gcMark [backport:1.2] Recently, we've discovered a GC crash resulting from inlining of the memory allocation procs that allowed the compiler to avoid maintaining any references to the "user pointer" on the stack. Instead, a "cell pointer" appeared there and all field accesses were performed with adjusted offsets. This interfered with the ability of the GC to mark the correct cell in the conservative stack scans which lead to premature collection of objects. More details here: https://github.com/status-im/Nim/commit/af69b3ceae16281efd45cbee4ce1bedd14282304 This commit closes another theoretical loophole that may lead to the same problem. If a short proc is accessing both the object and its reference count in a short sequence of instructions, the compiler may be enticed to reduce the number of registers being used by storing only a single pointer to the object and using offsets when reading and writing fields. A perfectly good strategy would be to store only the cell pointer, so the reference count updates can be performed without applying offsets. Accessing the fields of the object requires offsets anyway, but these can be adjusted at compile-time without any loss. Following this strategy will lead to the same problem of marking a wrong cell during the conservative stack scan, leading to premature collection. The problem is avoided by not using `usrToCell` in `gcMark`. Since the cell discovery logic can already handle interior pointers, the user pointers don't need to be adjusted for the GC to function correctly.
* add number literal jsbigints.big (#17707)Timothee Cour2021-04-131-7/+13
|
* remove unnecessary assignment (#17702)flywind2021-04-121-1/+0
|
* followup strformat PR. backslash escapes, tests, docs (#17700)shirleyquirk2021-04-121-4/+29
| | | | | | | | | | | | | | | | | | | | | | * Allow use of colons inside fmt allowing colons inside fmt by replacing the format specifier delimiter lets arbitrary nim code be run within fmt expressions. Co-authored-by: flywind <xzsflywind@gmail.com> * formatting,documentation,backslash escapes Adding support for evaluating expressions by special-casing parentheses causes this regression: `&"""{ "(hello)" }"""` no longer parses. In addition, code such as &"""{(if open: '(' else: ')')}""" wouldn't work. To enable that, as well as the use of, e.g. Table constructors inside curlies, I've added backslash escapes. This also means that if/for/etc statements, unparenthesized, will work, if the colons are escaped, but i've left that under-documented. It's not exactly elegant having two types of escape, but I believe it's the least bad option. * changelog * added json strformat test * pulled my thumb out and wrote a parser Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: flywind <xzsflywind@gmail.com>
* macrocache.nim: removed trailing whitespaceAraq2021-04-111-23/+23
|
* iterable[T] (#17196)Timothee Cour2021-04-111-0/+4
| | | | | | | | * fix failing test toSeq in manual which now works * changelog * reject proc fn(a: iterable) * add iterable to spec * remove MCS/UFCS limitation that now works
* [feature] add arbitrary code execution to strformat (#17694)shirleyquirk2021-04-111-9/+28
| | | | | | | | | * changed parser to ignore ':' within parens * Update strformat.nim * Update lib/pure/strformat.nim Co-authored-by: flywind <xzsflywind@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* restyle RST option lists (#17637)Andrey Makarov2021-04-103-8/+16
| | | | | | | | | | | | | * WIP: restyle RST option lists * apply similar style to Latex * fix tests * minor visual tweaks * update tests * remove leftover comments
* Genode platform fixes (#17521)Emery Hemingway2021-04-094-24/+48
| | | | | | | | | | | | | | | | | | | * Genode: move dyncall failures to runtime Do not use the "error" pragma to warn that dynamic library loading is not implemented, print a message at runtime and exit. * Genode: use stricter dataspace type in page allocator * Genode: remove compiler configuration from nim.cfg Self-hosting Nim is not supported on Genode and defining the cross-compilation environment can be done externally. * Genode: use new mutex API * Genode: call nim_component_construct as a C procedure * Genode: implement echo for NimStringV2
* hashes: Made the runnableExample easier to understand (#17689)Andreas Rumpf2021-04-091-1/+1
|
* add std/tasks (#17447)flywind2021-04-091-0/+272
|
* Fix small typos (#17680)konsumlamm2021-04-091-0/+1
|
* Fix rst typo (#17671)konsumlamm2021-04-081-1/+1
|
* Update `sysrand` documentation (#17676)konsumlamm2021-04-081-16/+16
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* further progress on rst roles & directives (fix #17646) (#17659)Andrey Makarov2021-04-0810-50/+92
| | | | | | | * further progress on rst roles & dir-s (fix #17646) * fix documents according to the messages * fix bug 17 from #17340
* Improve endians module (#17674)konsumlamm2021-04-081-7/+42
| | | | Extend documentation Add runnableExamples
* use strstr for a faster find implementation (#17672)Andreas Rumpf2021-04-081-3/+26
| | | | | * use strstr for a faster find implementation * stress the -d:release and -d:danger switches
* fixes #17647 (#17667)Andreas Rumpf2021-04-074-21/+21
|
* use sink and lent in deques (#17661)flywind2021-04-071-10/+10
| | | | | | | | | * use sink and lent in deques * Update lib/pure/collections/deques.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* ensure the avr example keeps compiling (#17663)Andreas Rumpf2021-04-071-0/+4
| | | | | | | * ensure the avr example keeps compiling * Update tests/avr/thello.nim * now compiles properly
* close #4451 (#17627)flywind2021-04-061-1/+2
|
* don't run one example on 32-bit machines (#17655)Miran2021-04-061-3/+4
| | | | | This example seems to break our 32-bit nightlies builds. This is just a temporary solution (TM) until we figure out a better one.
* ref #14873 (#17644)flywind2021-04-061-0/+5
| | | | | | | * ref #14873 * comment * Update lib/core/locks.nim
* items(array)+friends: remove a RT comparison (#17650)Timothee Cour2021-04-061-8/+8
|
* document caveats of quit (#17648)Timothee Cour2021-04-051-4/+8
|