| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
| |
`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
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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]
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.
|
| |
|
|
|
|
| |
* 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
* megatest: show compilation progress
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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: integrity checking: the plumbing code
* progress
* progress + bugfix (yes, the code already found a bug)
* implemented integrity checking
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
| |
* 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
* avoid highlighting of "method"
* use relative path
* 2 more changes
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WIP: restyle RST option lists
* apply similar style to Latex
* fix tests
* minor visual tweaks
* update tests
* remove leftover comments
|
|
|
|
|
|
|
|
|
|
|
| |
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
* IC: make converter example work
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* ast: add getPIdent
* fixup
|
|
|
|
| |
* nep1: guidelines for getters and setters
* address a comment
|
|
|
|
|
| |
* IC: added basic test case for methods
* IC: better methods test
|
| |
|
| |
|
| |
|
|
|
| |
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
| |
* further progress on rst roles & dir-s (fix #17646)
* fix documents according to the messages
* fix bug 17 from #17340
|
|
|
|
|
|
|
| |
* manual: minor improvements
* Update doc/manual.rst
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
|
|
|
|
| |
Extend documentation
Add runnableExamples
|
|
|
|
|
| |
* use strstr for a faster find implementation
* stress the -d:release and -d:danger switches
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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
* Update tests/avr/thello.nim
* now compiles properly
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* add compiler/debugutils.nim
* address comments
|
|
|
|
|
| |
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
* fix #17621
* Update compiler/semtypes.nim
|
|
|
|
|
|
|
| |
* ref #14873
* comment
* Update lib/core/locks.nim
|
| |
|