summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* simplify asyncfutures, asyncmacro (#17633)Timothee Cour2021-04-145-94/+64
|
* getCustomPragma is split up in more usable chunks (#11526)Arne Döring2021-04-143-96/+193
| | | | | | | | | | | | | | | | | * 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
|
* IC: first steps towards 'nim check --def --ic:on' (#17714)Andreas Rumpf2021-04-1411-12/+211
| | | | | | | | | * IC: first steps towards 'nim check --def --ic:on' * IC navigator: deduplicate output lines * IC navigator: progress * IC navigator: use a different nimcache entry * IC navigator: special logic for templates/macros * IC navigator: proper error messages * IC navigator: prepare for testing code; document only what currently works somewhat
* 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.
* testament --verbose: prints commands; gitignore ic artifacts (#17716)Timothee Cour2021-04-142-5/+16
|
* type with same name in different scope now works (#17710)Timothee Cour2021-04-144-9/+133
| | | | * type with same name in different scope now works * fix tests/enum/tenum.nim which was wrong because it was affected by this bug
* megatest: allow duplicate file names, show compilation progress (#17713)Timothee Cour2021-04-133-6/+15
| | | | | * megatest: allow duplicate file names * megatest: show compilation progress
* IC: code cleanup (#17708)Andreas Rumpf2021-04-131-45/+12
|
* add number literal jsbigints.big (#17707)Timothee Cour2021-04-132-10/+16
|
* IC: serialization bugfix (#17701)Andreas Rumpf2021-04-131-4/+4
|
* remove unnecessary assignment (#17702)flywind2021-04-121-1/+0
|
* followup strformat PR. backslash escapes, tests, docs (#17700)shirleyquirk2021-04-123-6/+90
| | | | | | | | | | | | | | | | | | | | | | * 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>
* IC: added tcompiletime_counter test case (#17698)Andreas Rumpf2021-04-112-0/+39
|
* macrocache.nim: removed trailing whitespaceAraq2021-04-111-23/+23
|
* IC: integrity checking (#17695)Andreas Rumpf2021-04-118-5/+166
| | | | | | * IC: integrity checking: the plumbing code * progress * progress + bugfix (yes, the code already found a bug) * implemented integrity checking
* iterable[T] (#17196)Timothee Cour2021-04-1118-40/+254
| | | | | | | | * 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>
* turn on syntax highlighting in Manual & Tutorial (#17692)Andrey Makarov2021-04-117-137/+149
| | | | | | | | | * turn on syntax highlighting in Manual & Tutorial * avoid highlighting of "method" * use relative path * 2 more changes
* restyle RST option lists (#17637)Andrey Makarov2021-04-107-21/+103
| | | | | | | | | | | | | * WIP: restyle RST option lists * apply similar style to Latex * fix tests * minor visual tweaks * update tests * remove leftover comments
* refs #15667 improve invalid indentation errors, report when & where `=` ↵Timothee Cour2021-04-103-4/+74
| | | | | | | | | | | could be missing (#16397) * refs #15667 improve invalid indentation errors * also show line info where = is missing * add test * add more tests
* IC: added converter test case (#17688)Andreas Rumpf2021-04-094-3/+30
| | | | | * IC: added converter test case * IC: make converter example work
* Genode platform fixes (#17521)Emery Hemingway2021-04-097-53/+60
| | | | | | | | | | | | | | | | | | | * 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-093-0/+780
|
* make repr handle setters `foo=` (#17683)Timothee Cour2021-04-092-5/+17
|
* ast: add getPIdent (#17684)Timothee Cour2021-04-093-16/+19
| | | | | * ast: add getPIdent * fixup
* nep1: guidelines for getters and setters (#17645)Timothee Cour2021-04-091-0/+9
| | | | * nep1: guidelines for getters and setters * address a comment
* IC: added basic test case for methods (#17679)Andreas Rumpf2021-04-094-6/+62
| | | | | * IC: added basic test case for methods * IC: better methods test
* Fix small typos (#17680)konsumlamm2021-04-092-1/+2
|
* undocument unsupported advanced options (#17678)Andreas Rumpf2021-04-091-13/+6
|
* Fix rst typo (#17671)konsumlamm2021-04-081-1/+1
|
* Update `sysrand` documentation (#17676)konsumlamm2021-04-082-20/+20
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* further progress on rst roles & directives (fix #17646) (#17659)Andrey Makarov2021-04-0812-51/+129
| | | | | | | * further progress on rst roles & dir-s (fix #17646) * fix documents according to the messages * fix bug 17 from #17340
* manual: minor improvements (#17677)Andreas Rumpf2021-04-081-47/+47
| | | | | | | * manual: minor improvements * Update doc/manual.rst Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Improve endians module (#17674)konsumlamm2021-04-081-7/+42
| | | | Extend documentation Add runnableExamples
* use strstr for a faster find implementation (#17672)Andreas Rumpf2021-04-082-4/+32
| | | | | * use strstr for a faster find implementation * stress the -d:release and -d:danger switches
* fixes #17647 (#17667)Andreas Rumpf2021-04-075-22/+22
|
* minor typos (#17668)flywind2021-04-071-2/+2
|
* use sink and lent in deques (#17661)flywind2021-04-072-12/+61
| | | | | | | | | * 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-074-0/+35
| | | | | | | * ensure the avr example keeps compiling * Update tests/avr/thello.nim * now compiles properly
* removing warning imported and not used debugutils (#17660)rockcavera2021-04-071-1/+2
|
* fixes #17656 (#17657)Andreas Rumpf2021-04-071-1/+2
|
* close #4451 (#17627)flywind2021-04-062-1/+10
|
* add compiler/debugutils.nim to help debugging compiler (#17652)Timothee Cour2021-04-062-7/+35
| | | | | * add compiler/debugutils.nim * address comments
* 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.
* fix #16898 #17621 (#17628)flywind2021-04-064-3/+52
| | | | | | * fix #16898 * fix #17621 * Update compiler/semtypes.nim
* ref #14873 (#17644)flywind2021-04-063-3/+12
| | | | | | | * ref #14873 * comment * Update lib/core/locks.nim
* close #17636 (#17643)flywind2021-04-0616-77/+62
|