Commit Graph

71 Commits

Author SHA1 Message Date
cooldome
77df02313d fix #15238 (#15262)
* fix_15238

* fix test
2020-09-04 10:26:14 +02:00
cooldome
f8c48fc186 fix #15035 (#15236) 2020-08-28 17:57:52 +02:00
Andreas Rumpf
8e3f51f06c fixes #15130 (#15141)
* fixes #15130

* you really have to copy from cursors
2020-08-01 18:04:04 +02:00
Andreas Rumpf
9ff2c50155 fixes #15122 [backport:1.2] (#15139) 2020-08-01 13:16:50 +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
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
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
624762cfb7 fixes #15052 2020-07-26 01:16:06 +02:00
Danil Yarantsev
080bed8b6b Add a test-case for #12990 (#15072)
* closes #12990
* Add a test-case for #12990
2020-07-25 20:35:20 +02:00
Andreas Rumpf
c90c53e8bb fixes #15044 [backport:1.2] 2020-07-23 20:27:17 +02:00
Danil Yarantsev
f25454d5c6 Add a testcase for #14480. Fixes #14480 (#15037) 2020-07-22 09:52:38 +02:00
Andreas Rumpf
3a4e4cec4d cursor inference bugfix 2020-07-20 18:37:14 +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
Clyybber
282128ab66 Fix #14994 (#14996)
* Fix #14994

* Revert misplaced "optimization"

* Typo
2020-07-15 23:33:58 +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
813dd1b670 repr_v2 improvements (#14992)
* Support proc in arc repr

* Typo

* Improve repr for strings and chars
2020-07-15 22:04:15 +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
Clyybber
1850efbb6c Add testcase for #14383 (#14957) 2020-07-10 18:10:32 +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
Andreas Rumpf
87f6a9592c fixes #14402 (#14908)
* fixes #14402

* added a test case
2020-07-08 08:21:55 +02:00
Clyybber
8480bef1c4 Add testcase for #14864 (#14928)
* Add testcase for #14864

* :D
2020-07-07 22:43:36 +02:00
Clyybber
ebd97884a0 Add testcase for #14472 (#14921) 2020-07-06 20:53:38 +02:00
Clyybber
af27e6bdea Fix #14396 (#14793)
* Correct Left-To-Right evaluation of proc args
* Fix CPP backend
* Add testcase
* closes #14396
* closes #14345
* Improve test and optimize
* Improve testcase and optimize literals
* Fix bug
* Expand testcase and use DFA to optimize
* Turn genParams into proc
* Turn withTmpIfNeeded into a proc
* Cleanup
* Fix crash
* Better analysis
* Cleanup
* Trailing newline..
* Fix build
* Tiny cleanup

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-07-04 17:45:07 +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
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
3105909f88 fixes #14495 [backport:1.2] (#14496) 2020-05-29 23:35:57 +02:00
Clyybber
7fe4c66f35 Small improvements for string and char repr with gc:arc (#14400)
* Small improvements for string and char repr with gc:arc

* Fix test
2020-05-20 12:54:04 +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
cooldome
5fb40af57e fix #14333 (#14336)
Co-authored-by: cooldome <ariabushenko@bk.ru>
2020-05-13 23:57:05 +02:00
Timothee Cour
1648f1dd99 fix #14320 (tasyncawait.nim is recently very flaky) + avoid hardcoding service ports everywhere + flakyAssert (#14327)
* hotfix #14320 tasyncawait.nim is recently very flaky
* fix #14327
* add flakyAssert
2020-05-13 11:05:47 +02:00
Timothee Cour
dddfbcf211 close #13071 by adding test: nim cpp -r --gc:arc` segfaults on caught AssertionError (#14323) 2020-05-12 19:19:31 +02:00
cooldome
2d7ccf0928 fix #14312 2020-05-12 10:23:05 +01:00
cooldome
a39123c93c fix #14219 (#14225)
Co-authored-by: cooldome <ariabushenko@bk.ru>
2020-05-11 23:11:20 +02:00
Clyybber
8e93105606 Fix #14269 (#14286) 2020-05-09 18:22:25 +02:00
Clyybber
120ea906fb Fix #14270 and add testcases (#14276) 2020-05-08 15:54:34 +02:00
cooldome
5fa7d374c4 fix #14243 (#14257)
* fix #14243

Co-authored-by: cooldome <ariabushenko@bk.ru>
2020-05-07 22:15:25 +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
cooldome
0d8507cd3d fix #14236 (#14250)
Co-authored-by: cooldome <ariabushenko@bk.ru>
2020-05-07 00:13:59 +02:00
cooldome
6dba06f9e6 fixes #14244 (#14248)
Co-authored-by: cooldome <ariabushenko@bk.ru>
2020-05-06 20:43:18 +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
Andreas Rumpf
d9e907c0e2 fixes #14079 [backport:1.2] (#14163) 2020-04-29 21:58:59 +02:00
Jacek Sieka
7d6cbf290a Error -> Defect for defects (#13908)
* Error -> Defect for defects

The distinction between Error and Defect is subjective,
context-dependent and somewhat arbitrary, so when looking at an
exception, it's hard to guess what it is - this happens often when
looking at a `raises` list _without_ opening the corresponding
definition and digging through layers of inheritance.

With the help of a little consistency in naming, it's at least possible
to start disentangling the two error types and the standard lib can set
a good example here.
2020-04-28 19:56:01 +02:00
Andreas Rumpf
dedb04fa9e new implementations for --gc:orc (#14121)
* cycle collector: new implementation
* cycle collector: make self-adaptive based on its previous effectiveness
* cycle collector: added Lins's jump stack to improve traversal from 3*N to 2*N
* cycle collector: make tests green
* API extensions and bugfixes
* code cleanup and use --gc:orc for tasyncawait
2020-04-27 11:57:26 +02:00
Andreas Rumpf
269a458d74 cycle collector (#14071)
* figured out the wrong cycle trace proc problem
* cycle collector/break refactorings and minor improvements
2020-04-22 17:34:35 +02:00