summary refs log tree commit diff stats
path: root/tests/destructor
Commit message (Collapse)AuthorAgeFilesLines
* disable sink inference, only enable it for the stdlib. Reason: better source ↵Andreas Rumpf2020-07-281-0/+1
| | | | code compatibility (#15105)
* An optimizer for ARC (#14962)Andreas Rumpf2020-07-153-7/+15
| | | | | | | | | | | | | | | | | | | | * 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>
* injectdestructors fixes and refactor (#14964)Clyybber2020-07-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* fixes #14925 (#14947)Andreas Rumpf2020-07-091-1/+8
|
* progressAraq2020-07-081-1/+1
|
* scoped memory management (#14790)Andreas Rumpf2020-07-041-19/+19
| | | | | | | * fixes the regressions * closes #13936 * scope based memory management implemented * enabled tcontrolflow.nim test case * final cleanups
* Fix #14647 (#14776)Clyybber2020-06-281-1/+7
| | | | | | | | | * Fix #14647 * Correct fix * Typo and add test * For real now :p
* Add testcases for #11811 and #14315 (#14726)Clyybber2020-06-191-1/+11
| | | | | * Add testcase for #11811 * Add testcase for #14315
* Fix #14568 (#14583)Clyybber2020-06-071-0/+1
| | | | | | | * Fix #14568 * Add testcase * Fix bogus test * Adapt other failing tests * Declarations are always first writes
* fix #14421 items uses lent T (#14447)Timothee Cour2020-05-297-7/+7
| | | | | * fix #14421 items uses lent T for seq + openArray * add -d:nimWorkaround14447 * fix test
* ARC/ORC: optimize s.setLen(0) to match the old runtime's behaviour (#14423)Andreas Rumpf2020-05-211-1/+1
|
* Small improvements for string and char repr with gc:arc (#14400)Clyybber2020-05-201-1/+1
| | | | | * Small improvements for string and char repr with gc:arc * Fix test
* fix #14294 (#14301)cooldome2020-05-111-1/+25
| | | | | | | * fix #14294 * fix orc as well Co-authored-by: cooldome <ariabushenko@bk.ru>
* fix #14217 (#14218)cooldome2020-05-051-0/+26
| | | | | * fix #14217 Co-authored-by: cooldome <ariabushenko@bk.ru>
* fixes #14159 [backport:1.2]Araq2020-05-021-0/+33
|
* fixes #14054 [backport:1.2] (#14061)Andreas Rumpf2020-04-301-1/+1
| | | | | | | | | * fixes #14054 * make tests green again * more tests are green * maybe now
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-283-8/+8
| | | | | | | | | | | | | | * 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.
* fixes a critical =trace generation bug (see test case) (#14140)Andreas Rumpf2020-04-271-0/+16
|
* new implementations for --gc:orc (#14121)Andreas Rumpf2020-04-275-0/+6
| | | | | | | | | * 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
* Implements RFCs #209 (#13995)cooldome2020-04-161-7/+3
| | | | | * add test * add changelod entry Co-authored-by: cooldome <ariabushenko@bk.ru>
* fixes #13782 (#13834)Andreas Rumpf2020-04-011-1/+21
|
* faster CIs (#13803)Miran2020-03-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ttables: smaller table, 5x speedup * thavlak: less iterations, less loops; 30% speedup * tasyncclosestall: shorter timeout; 35% speedup * gcleak4: less iterations, 2x speedup * ttimes: remove deprecated stuff * tdangerisrelease: remove cpp backend, 3x speedup * tfrexp1: smaller range, 2x speedup * trtree: fix warnings, less iterations, 6x speedup * tasyncawait_cyclebreaker: smaller swarm size; 2x speedup * trealloc: smaller number of iterations; 10x speedup * towned_binary_tree: less iterations, 4x speedup * tclosure: remove unused code, less iterations; 2x speedup * twaitany: less durations; 1.4x speedup * tasync_misc: less iterations, 2x speedup * t8535: smaller sleep, 1.5x speedup * tmanyjoin: smaller sleep, 2x speedup * t12221: shorter sleeps, removed two slower tests; 1.6x speedup * tfuturestream: smaller sleep; 1.5x speedup * growobjcrash: less iterations; 2x speedup * ttryrecv: smaller sleep; 1.5x speedup * treusetvar: less threads; 2x speedup * delete tthreadanalysis2, basically a duplicate of tthreadanalysis * t7758: less iterations, 1.5x speedup * tasyncawait: smaller swarm, less messages; 1.5x speedup * tjsandnativeasync: smaller sleep, 1.5x speedup * tpendingcheck: smaller sleep, 1.5x speedup * remove rodfiles test category * move tseq from its own category to 'collections' category * remove unneeded tests and helpers from 'assert' category * stdlib: merge tbitops2 into tbitops * remove 'trepr2' from 'stdlib' cat * merge 'tstreams' into one file * remove 'tinefficient_const_table' from 'ccbugs' cat * merge 'tcollections_to_string' into 'tcollections' * tblocking_channel: smaller sleep, small speedup * tconvexhull: less iterartions; 1.2x speedup * merge 'tdeepcopy2' into 'tdeepcopy' * merge 'tdisjoint_slice2' into 'tdisjoint_slice1' * tmissing_deepcopy: smaller sequence * tsendtwice: smaller arrays; 5x speedup * remove 'tindexerrorformatbounds' * disable multimethod tests * remove 'gc:none' and 'refc' without 'd:useRealtimeGC' from gc tests * koch.nim: bootstrap just with '-d:release', no need for 'csource' * add github workflow for documentation * testament: no need for 8 sub-second decimals
* arc optimizations (#13325)Andreas Rumpf2020-03-184-3/+8
| | | | | * 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
* rewritten goto based exception handling; much cleaner implementation;… ↵Andreas Rumpf2020-03-171-0/+69
| | | | | | (#13677) * rewritten goto based exception handling; much cleaner implementation; fixes #13668
* Fixes #13659 (#13674)cooldome2020-03-171-1/+25
| | | | | * fixes #13659 Co-authored-by: cooldome <ariabushenko@bk.ru>
* fixes #12747 [backport] (#13651)cooldome2020-03-162-2/+2
| | | | | | | * fixes #12747 * fix tests * improve code style Co-authored-by: cooldome <ariabushenko@bk.ru>
* catchable defects (#13626)Andreas Rumpf2020-03-121-0/+52
| | | | | | | | | | * allow defects to be caught even for --exceptions:goto (WIP) * implemented the new --panics:on|off switch; refs https://github.com/nim-lang/RFCs/issues/180 * new implementation for integer overflow checking * produce a warning if a user-defined exception type inherits from Exception directly * applied Timothee's suggestions; improved the documentation and replace the term 'checked runtime check' by 'panic' * fixes #13627 * don't inherit from Exception directly
* fixes #13436 (#13615)Andreas Rumpf2020-03-101-0/+10
|
* fixes #13599 (#13614)Andreas Rumpf2020-03-091-0/+39
|
* sink parameter inference for types that have destructors (#13544)Andreas Rumpf2020-03-042-2/+6
| | | | | | | | | | | | | | * 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
* fixes #13457 (#13458)Andreas Rumpf2020-02-211-1/+8
|
* Repr v2 progress (#13268)cooldome2020-01-281-1/+1
| | | | | | | | | | * progress on repr_v2 * repr progress * add ref objects with distrinct * fix failing tests
* ARC: remove unnecessary codeAraq2020-01-261-4/+3
|
* contributing docs: symbols need package prefix; changed allocStats to ↵Timothee Cour2020-01-258-8/+8
| | | | nimAllocStats (#13247)
* Removed lib/system/allocators.nim. seqs_v2 and strs_v2 now uses ↵Ico Doornekamp2020-01-239-56/+31
| | | | | | | | | | | | | | | | | | | | | | | | | allocShared0. (#13190) * Cleanup, remove lib/system/allocators.nim. seqs_v2 and strs_v2 now use allocShared0 by default. * Fixed -d:useMalloc allocShared / reallocShared / deallocShared. These now use the alloc/dealloc/realloc implementation that also takes care of zeroing memory at realloc. * Removed debug printfs * Removed unpairedEnvAllocs() from tests/destructor/tnewruntime_misc * More mmdisp cleanups. The shared allocators do not need to zero memory or throw since the regular ones already do that * Introduced realloc0 and reallocShared0, these procs are now used by strs_v2 and seqs_v2. This also allowed the -d:useMalloc allocator to drop the extra header with allocation length. * Moved strs_v2/seqs_v2 'allocated' flag into 'cap' field * Added 'getAllocStats()' to get low level alloc/dealloc counters. Enable with -d:allocStats * *allocShared implementations for boehm and go allocators now depend on the proper *allocImpl procs
* fixes #13195 (#13198)cooldome2020-01-201-0/+25
| | | | | | | | * fixes #13195 * extra fix * fix typo
* Revert "fixes #13195"Andrii Riabushenko2020-01-191-25/+0
| | | | This reverts commit cd7904f2b29e623998a1d32ee726d000f56fc5ce.
* revert last commitAndrii Riabushenko2020-01-191-0/+25
|
* more on arc codegen (#13178)cooldome2020-01-191-1/+20
| | | | | | | | | | | | * arc codegen for union type * add more tests * fix offsetof * fix tsizeof test * fix style
* make sink operator optional (#13068)cooldome2020-01-172-12/+4
| | | | | | | | | | | | | | | | * make sink operator optional * bug fix, add changelog entry * Trigger build * fix one regression * fix test * Trigger build * fix typos
* Working towards arc codegen (#13153)cooldome2020-01-161-0/+57
| | | fixes #13029
* fixes #13105 (#13138)Andreas Rumpf2020-01-141-0/+18
|
* fixes #13119 (#13128)Andreas Rumpf2020-01-141-0/+12
| | | | | * fixes #13119 * fixes a regression
* fixes #13112 (#13127)Andreas Rumpf2020-01-131-0/+6
| | | | | | * improve line error information * fixes #13112
* more arc features (#13098)Andreas Rumpf2020-01-101-0/+25
| | | | | * config update * ARC now supports 'repr' and 'new' with finalizers is supported
* fixes #13070Araq2020-01-101-0/+40
|
* Continue #13002 (#13021)Clyybber2020-01-061-1/+1
|
* fixes #12964 (#13027)Andreas Rumpf2020-01-041-0/+14
|
* Fixes #13026 (#13028)cooldome2020-01-041-1/+83
|
* fixes #12961 (#13019)Andreas Rumpf2020-01-031-0/+11
|