| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- add additional parameters parsing (other implementations will just
ignore them). E.g. if in RST we have:
.. code:: nim
:test: "nim c $1"
...
then in Markdown that will be:
```nim test="nim c $1"
...
```
- implement Markdown interpretation of additional indentation which is
less than 4 spaces (>=4 spaces is a code block but it's not
implemented yet). RST interpretes it as quoted block, for Markdown it's
just normal paragraphs.
- add separate `md2html` and `md2tex` commands. This is to separate
Markdown behavior in cases when it diverges w.r.t. RST significantly —
most conspicously like in the case of additional indentation above, and
also currently the contradicting inline rule of Markdown is also turned
on only in `md2html` and `md2tex`. **Rationale:** mixing Markdown and
RST arbitrarily is a way to nowhere, we need to provide a way to fix the
particular behavior. Note that still all commands have **both** Markdown
and RST features **enabled**. In this PR `*.nim` files can be processed
only in Markdown mode, while `md2html` is for `*.md` files and
`rst2html` for `*.rst` files.
- rename `*.rst` files to `.*md` as our current default behavior is
already Markdown-ish
- convert code blocks in `docgen.rst` to Markdown style as an example.
Other code blocks will be converted in the follow-up PRs
- fix indentation inside Markdown code blocks — additional indentation
is preserved there
- allow more than 3 backticks open/close blocks (tildas \~ are still not
allowed to avoid conflict with RST adornment headings) see also
https://github.com/nim-lang/RFCs/issues/355
- better error messages
- (other) fix a bug that admonitions cannot be used in sandbox mode; fix
annoying warning on line 2711
|
|
|
|
| |
* renamed 'gc' switch to 'mm'; [backport:1.6]
* better docs
|
|
|
|
|
|
|
|
|
|
| |
* Call {.cursor.} a pragma.
Its hard to find .curser annotation while googling because all other things like it are called pragmas. See https://nim-lang.org/docs/manual.html#pragmas
Also the . in front of the name makes it hard to find and search for.
Can we just call it cursor pragma?
* Small fix for comment.
|
| |
|
|
|
|
| |
(#19065)
|
| |
|
| |
|
|
|
|
|
| |
* cleaned up destructors documentation [backport]
* Spec updates [backport:1.0]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [skip ci] thamming_orc test created/destroyed counts match
The thamming_orc.nim code now counts all created objects being tested, not just the ones following the "first 20" test, and the position of the `destroyed += 1` counter has been adjusted so it counts all the calls that are as a result of `=trace` tracing and not just the original destruction calls.
* Improve description of how `=trace` is used
The following nuances weren't previously fully explained:
1. That `=trace` is only used by `--gc:orc`.
2. That `=trace` is almost certainly used along with `=destroy` when manual resource allocation has been used, but it is only required if there is a possibility of cyclic references in the wrapped types (ie. generic types).
3. That, currently, a forward definition is required for the second of the pair to avoid an auto compiler generation conflict.
The pattern of the use of `=trace` has also been made more extensive, showing how both a custom `=destroy` and `=trace` are used for manual allocation of resources when there is any possibility of a cyclic reference in the resource-wrapped values.
* Update doc/destructors.rst
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
| |
* ORC: support custom =trace procs (WIP)
* Update tests/arc/tcustomtrace.nim
Co-authored-by: Clyybber <darkmine956@gmail.com>
* =trace is now documented and seems to work
* make test green
Co-authored-by: Clyybber <darkmine956@gmail.com>
|
| |
|
|
|
|
|
| |
* follow-up #17837: add `Console` for interactive sessions
* fix Latex
|
| |
|
|
|
|
|
| |
(#17258)
Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
|
| |
|
| |
|
|
|
|
|
|
|
| |
* remove unnecessary when statement
* remove outdated codes
* rename prepareStrMutation to prepareMutation
|
|
|
|
|
|
| |
* Update doc/destructors.rst
Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
| |
* document type bound rountines
* address comments
* Update doc/manual.rst
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix #16185
* fix test
* fix comment
* fix comment
* better approach
* Add more tests and move sameLocation to injectdestructors
* Better and more strict sameLocation
* Small cleanup and preliminary spec clarification
* Fix
* Fix doc
* Expand test
Co-authored-by: Andrey R (cooldome) <ariabushenko@gmail.com>
|
|
|
|
|
| |
* include example of error-marked copy proc
* Update destructors.rst
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* Assign hook name changed to `=copy`
* Adapt destructors.rst
* [nobackport] Duplicate tests for =copy hook
* Fix tests
* added a changelog entry
Co-authored-by: Clyybber <darkmine956@gmail.com>
|
|
|
|
| |
code compatibility (#15105)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WIP: an optimizer for ARC
* do not optimize away destructors in 'finally' if unstructured control flow is involved
* optimized the optimizer
* minor code cleanup
* first steps to .cursor inference
* cursor inference: big steps to a working solution
* baby steps
* better .cursor inference
* new feature: expandArc for easy inspection of the AST after ARC transformations
* added topt_cursor test
* adapt tests
* cleanups, make tests green
* optimize common traversal patterns
* moved test case
* fixes .cursor inference so that npeg compiles once again
* cursor inference: more bugfixes
Co-authored-by: Clyybber <darkmine956@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
* fixes the regressions
* closes #13936
* scope based memory management implemented
* enabled tcontrolflow.nim test case
* final cleanups
|
| |
|
|
|
|
|
|
| |
* fixes #13881
* documented changed requirements for system.onThreadDestruction
* destructors.rst: update the documentation
|
| |
|
|
|
|
|
| |
* scope based destructors
* handle 'or' and 'and' expressions properly, see the new test arc/tcontrolflow.nim
* make this branch mergable, logic is disabled for now
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ensure capitalize doesn't take an inferred sink parameter
* sink parameter inference: first version, for now disabled. Changed that sink parameters can be consumed multiple times in order to adhere to our spec.
* sink inference can now be disabled with .nosinks; sometimes for proc type interop this is required
* fixes yet another critical DFA bug
* better implementation that also understands if expressions etc
* document sink parameter inference and allow for global disabling
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* make sink operator optional
* bug fix, add changelog entry
* Trigger build
* fix one regression
* fix test
* Trigger build
* fix typos
|
| |
|
| |
|
| |
|
| |
|
|
|