cooldome
a3e9cc5234
Introduce explicit copy ( #15330 )
2020-09-16 17:26:45 +02:00
Andreas Rumpf
ae4ede6b00
fixes #15325 ( #15340 )
2020-09-16 17:26:13 +02:00
cooldome
61c85e034d
Fix #15286 ( #15292 )
...
* fix #15286
* fix spacing
2020-09-10 12:40:39 +02:00
Clyybber
13e659cfec
Big compiler Cleanup ( #14777 )
2020-08-28 22:18:09 +02:00
cooldome
f8c48fc186
fix #15035 ( #15236 )
2020-08-28 17:57:52 +02:00
Andreas Rumpf
d130175342
cursor and mutation tracking fixes ( #15113 )
...
* fixes #15110
* fixes #15096
* prepare varpartitions for cursor inference
* new cursor inference begins to work
* make tests green
2020-07-30 17:32:48 +02:00
Andreas Rumpf
e6f0d4a5a5
fixes #15076 ( #15095 )
2020-07-27 23:27:20 +02:00
Araq
318f0992ea
fixes a closure iterator memory leaks, progress on #15076
2020-07-27 13:07:09 +02:00
Andreas Rumpf
aae998feff
fixes #15038 [backport:1.2]
2020-07-26 01:16:06 +02:00
Andreas Rumpf
18a70a7563
fixes #15036
2020-07-23 20:27:17 +02:00
Andreas Rumpf
d4984e069a
arc: cursors for simple for loop variables ( #15008 )
...
* arc: cursors for simple for loop variables
* merged devel
2020-07-17 15:24:36 +02:00
Clyybber
1355b461aa
Show that a variable is cursor in --expandArc ( #15002 )
2020-07-17 10:56:17 +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
08159733cd
Fix #14985 ( #14988 )
2020-07-15 11:34:10 +02:00
Clyybber
2b0e336c97
injectdestructors fixes and refactor ( #14964 )
...
* injectdestructors fixes and refactor
* Tiny cleanup
* Refactor and expand testcase
* Closes #14902 by adding testcase
* Better naming
* Fix test failures
* Misc cleanup
* Add testcase for #14968
* Better approach; expand testcases
* Optimizations and fixes
* Add testcase
* typo
* Tiny cleanup
2020-07-14 14:15:39 +02:00
Araq
4603197fe8
fixes a minor regression
2020-07-10 13:36:02 +02:00
Araq
112511084d
fixes the tcontrolflow regression, clen idea of an escaping expression
2020-07-10 13:36:02 +02:00
Araq
b59385f22b
no wasMoved() calls after destructors necessary
2020-07-10 13:36:02 +02:00
Araq
37a98c77f3
optimize sinks even when in a loop
2020-07-10 13:36:02 +02:00
Clyybber
4a1128d16c
Move wasMoved out of =destroy
2020-07-10 13:36:02 +02:00
Clyybber
3e52136f26
Cosmetics
2020-07-10 13:36:02 +02:00
Clyybber
27579cfd3a
Make arc compile laser again
2020-07-08 16:20:16 +02:00
Andreas Rumpf
06d776a582
fixes #14900 , this time for real, maybe ( #14934 )
2020-07-08 14:47:14 +02:00
Araq
ecf8cbbbe0
fixes #14900
2020-07-08 10:48:12 +02:00
Araq
cdce245a23
fixes #14899
2020-07-08 10:48:12 +02:00
Araq
b17e1efc67
progress
2020-07-08 10:48:12 +02:00
Andreas Rumpf
a61a7889b8
injectdestructors: refactoring, added more cases explicitly ( #14929 )
2020-07-07 17:47:57 +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
Clyybber
62394616e8
DFA and injectdestructors cleanup ( #14824 )
...
* DFA and injectdestructors cleanup
* More precise write analysis
* Cleanup obsoleted path
* Unify defInstrTargets and useInstrTargets
* Misc cleanups
* Nicer CFG printing
* Misc cleanups 2
2020-06-28 19:36:30 +02:00
Clyybber
52841dba09
Fix #14568 ( #14583 )
...
* Fix #14568
* Add testcase
* Fix bogus test
* Adapt other failing tests
* Declarations are always first writes
2020-06-07 23:32:41 +02:00
Andreas Rumpf
419dbd573d
fixes #14118 ( #14595 )
2020-06-07 20:11:42 +02:00
Andreas Rumpf
e31ac81899
more checking for --gc:arc, no need for valgrind ( #14467 )
...
* sigmatch: removed dead code
2020-05-29 12:08:17 +02:00
Clyybber
9f78f116b2
New "ping-pong" DFA ( #14322 )
...
* New ping-pong analysis
* Add testcase for #13456
* Remove debugging leftover
* Unquote "unstructured controlflow"
* Fix typo
* Fix exponential complexity in edge cases
* Add sanity testcase
* Fix
2020-05-15 19:24:43 +01:00
b3liever
09ea8f9cf8
fix detecting closure env for nested asts ( #14326 )
...
Co-authored-by: b3liever <b3liever@yandex.com>
2020-05-12 20:09:56 +02:00
cooldome
a39123c93c
fix #14219 ( #14225 )
...
Co-authored-by: cooldome <ariabushenko@bk.ru>
2020-05-11 23:11:20 +02:00
b3liever
a081b10b54
small refactoring ( #14303 )
...
Co-authored-by: Antonis <b3liever@yandex.com>
2020-05-11 19:12:25 +02:00
Antonis
517dd800f8
better error message
2020-05-11 15:39:44 +02:00
Antonis
3616b0698b
fix closure env check
2020-05-11 15:39:44 +02:00
Clyybber
42db75c970
Fix the DFA for "unstructured controlflow" ( #14263 )
...
* Fix the DFA for "unstructured controlflow"
* Add testcase from #14233
2020-05-07 21:41:55 +02:00
Andreas Rumpf
b6fb609e0d
destructors: don't produce stupid code for 'cast' ( #14208 ) [backport:1.2]
...
* destructors: don't produce stupid code for 'cast'
* fixes #14207
2020-05-04 07:43:22 +02:00
cooldome
d3b0132061
Step2: fixes #13781 , fixes #13805 ( #13897 )
...
* Fix sym owner in wrapper proc
* threadpool changes
* revert lowerings
* add newFastMoveStmt
* try fixing test by switching to cpp
Co-authored-by: cooldome <ariabushenko@bk.ru>
2020-04-16 23:27:08 +02:00
cooldome
9295251e68
Implements RFCs #209 ( #13995 )
...
* add test
* add changelod entry
Co-authored-by: cooldome <ariabushenko@bk.ru>
2020-04-16 21:04:05 +02:00
Andreas Rumpf
fc5dd11b3d
fixes #13722 ( #13729 )
...
* fixes #13722
* better fix
2020-03-23 15:47:10 +01:00
Araq
ee440df02d
disable even more of scope based destruction handling; fixes #13709
2020-03-23 12:05:59 +01:00
Andreas Rumpf
034dad8e32
fixes #13691 ( #13694 )
2020-03-19 12:57:45 +01: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
a87062393a
fixes #13622 ( #13679 )
2020-03-18 13:42:33 +01:00
cooldome
35d14095ed
Fixes #13659 ( #13674 )
...
* fixes #13659
Co-authored-by: cooldome <ariabushenko@bk.ru>
2020-03-17 16:36:38 +01:00
Andreas Rumpf
090ba1e3a3
fixes #13436 ( #13615 )
2020-03-10 00:52:46 +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