Commit Graph

27 Commits

Author SHA1 Message Date
quantimnot
83ae70cb54 RST backtick refactor (all *.rst except manual.rst and rst_examples.rst) (#17258)
Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
2021-03-18 20:37:55 -07:00
Clyybber
283d9abc84 Make add work in the destructors example (#17354) 2021-03-15 13:03:00 +01:00
Clyybber
c7e4e96aaf Small fix to destructors example 2021-03-12 13:43:40 +01:00
flywind
a04c9d1f62 rename prepareStrMutation to prepareMutation (#17235)
* remove unnecessary when statement

* remove outdated codes

* rename prepareStrMutation to prepareMutation
2021-03-03 08:08:52 +08:00
flywind
0efd969569 document copy on write behavior of string literals in arc/orc (#17224)
* Update doc/destructors.rst

Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-03-02 13:05:04 +01:00
Timothee Cour
74a8f23801 document type bound operators (#17063)
* document type bound rountines
* address comments
* Update doc/manual.rst

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-02-23 13:52:20 +01:00
Clyybber
ccb11a63fb Reboot of #16195 (#16746)
* 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>
2021-01-20 11:05:56 +01:00
n5m
3be404af04 include example of error-marked copy proc (#15886)
* include example of error-marked copy proc

* Update destructors.rst
2020-11-09 11:45:43 +01:00
Andreas Rumpf
3aab6a409d micro improvements (#15849) 2020-11-05 14:56:44 +01:00
Yanis Zafirópulos
0cae8ef2ca Massive documentation fixes + copy editing (#15747) 2020-10-29 10:33:47 +01:00
Andreas Rumpf
da4aa2e1fb renamed '=' to '=copy' [backport:1.2] (#15585)
* 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>
2020-10-15 12:52:30 +02:00
Andreas Rumpf
86c9b78339 disable sink inference, only enable it for the stdlib. Reason: better source code compatibility (#15105) 2020-07-28 19:18:46 +02:00
Andreas Rumpf
be78b35bb8 cleanup ARC documentation (#15100) 2020-07-28 11:34:44 +02:00
Andreas Rumpf
c5358b0d4b An optimizer for ARC (#14962)
* 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>
2020-07-15 23:00:06 +02:00
Clyybber
bf51cee431 Update docs and changelog 2020-07-10 13:36:02 +02:00
Andreas Rumpf
1854d29781 scoped memory management (#14790)
* fixes the regressions
* closes #13936
* scope based memory management implemented
* enabled tcontrolflow.nim test case
* final cleanups
2020-07-04 07:37:24 +02:00
Danil Yarantsev
7936768560 Fix some typos (#14843) 2020-06-28 19:17:18 +02:00
Andreas Rumpf
06dfd31612 fixes #13881
* fixes #13881
* documented changed requirements for system.onThreadDestruction
* destructors.rst: update the documentation
2020-05-12 15:46:24 +02:00
hlaaftana
b2141fc2a1 changed type() to typeof() in docs and error messages (#14084) 2020-04-24 09:22:12 +02:00
Andreas Rumpf
fb641483f0 arc optimizations (#13325)
* 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
2020-03-18 16:57:34 +01:00
Andreas Rumpf
a0eca75182 sink parameter inference for types that have destructors (#13544)
* 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
2020-03-04 14:28:53 +01:00
cooldome
f51613e262 make sink operator optional (#13068)
* make sink operator optional

* bug fix, add changelog entry

* Trigger build

* fix one regression

* fix test

* Trigger build

* fix typos
2020-01-17 11:44:06 +00:00
Tomohiro
d31e32743f Fix typo in doc/destructors.rst (#13148) 2020-01-14 19:51:58 +01:00
Araq
44b1ecc287 destructors.rst: added a missing 'var' to the motivating example 2019-10-28 18:15:17 +01:00
Andreas Rumpf
da64c8762f destructors: spec reflects reality, =sink is here to stay 2019-08-11 21:55:47 +02:00
Andreas Rumpf
c9c8fa99cc destructors spec: be more precise about temporaries 2019-07-27 14:01:28 +02:00
Andreas Rumpf
d37c4e44d3 added destructors.rst document 2019-07-01 08:51:47 +02:00