Clyybber
4545995e2d
Revert "Revert "close #16607 add testcase ( #17317 )" ( #17336 )" ( #17347 )
...
This reverts commit 3ce27511ad .
2021-03-12 00:21:31 +01:00
Clyybber
3ce27511ad
Revert "close #16607 add testcase ( #17317 )" ( #17336 )
...
This reverts commit 1655103d83 .
2021-03-11 20:43:45 +08:00
flywind
58e88dbf12
close #9440 add testcase ( #17316 )
2021-03-09 22:50:17 -08:00
flywind
1655103d83
close #16607 add testcase ( #17317 )
2021-03-09 22:16:34 -08:00
flywind
e1cc3b83fb
deprecate newruntime ( #17245 )
...
* deprecate newruntime
* tests
* Update compiler/commands.nim
2021-03-04 19:33:16 +01:00
Saem Ghani
ab780f66ef
fixes #17198 , DFA failure on large case stmts ( #17210 )
...
This alters the DFA control flow graph generation for case statments.
Gotos are now generated as a chained link, this ensures that evaluation
of variant branches collapses as early as possible, without hitting the
2k call limit.
2021-03-02 10:32:43 +01:00
flywind
eabb9b79b2
close #5342 add testcase ( #17230 )
...
* remove unnecessary when statement
* remove outdated codes
* close #5342 add testcase
* update the example
2021-03-02 10:24:45 +01:00
Timothee Cour
b9994925f5
remove all uses of condsyms symbols defined prior to bootstrap nim 0.20.0 ( #16918 )
...
* nimNoArrayToCstringConversion deadcode
* nimbabel deadcode
* nimHasalignOf deadcode
* nimvarargstyped deadcode
* nimhygiene deadcode
* nimNewTypedesc deadcode
* nimlocks deadcode
* nimHasCppDefine deadcode
* nimHasRunnableExamples deadcode
* nimHasNilChecks deadcode
* nimSymKind deadcode
* minor macros refactoring
* nimVmEqIdent deadcode
* nimNoNil deadcode
* nimNoZeroTerminator deadcode
* nimHasSymOwnerInMacro deadcode
* nimVmExportFixed deadcode
* nimNewRuntime deadcode
* nimAshr deadcode
* nimUncheckedArrayTyp deadcode
* nimHasTypeof deadcode
* nimErrorProcCanHaveBody deadcode
* nimHasHotCodeReloading deadcode
* nimHasSignatureHashInMacro deadcode
* nimHasDefault deadcode
* nimMacrosSizealignof deadcode
2021-02-17 09:32:36 +01:00
Andreas Rumpf
e463a67c74
don't introduce 'dispose', use '=dispose', fixes #17003 [backport:1.4] ( #17062 )
2021-02-17 00:07:37 +01:00
flywind
6d442a40a6
use doAssert in tests ( #16486 )
2020-12-28 14:13:21 +01:00
Andreas Rumpf
868c31e88a
fixes #16365 [backport] ( #16381 )
2020-12-17 23:21:55 +01:00
Timothee Cour
7e1ae35195
testament: error instead of silently ignore invalid targets; remove pointless alias target vs targets; document matrix; DRY ( #16343 )
...
* testament: error instead of silently ignore invalid targets
* s/target/targets/
* fix test; refs #16344
* address comments
* Update testament/specs.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2020-12-14 10:58:29 +01:00
Timothee Cour
31a8cf16bb
testament spec: remove errmsg alias of errormsg ( #16188 )
2020-11-29 17:32:34 -08:00
Timothee Cour
b809562c7c
make megatest consistent with unjoined tests wrt newlines, honor newlines in output spec ( #16151 )
...
* fix megatest newlines
* still allow missing trailing newline for now but in a more strict way than before
2020-11-28 09:09:31 +01:00
cooldome
338602a402
fix #15825 ( #15894 )
...
* fix #15825
* better fix
2020-11-09 19:24:32 +01:00
Clyybber
7435d912ad
Add testcase for #14601 ( #15677 )
2020-10-22 13:23:39 +02: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
e9fa486493
fixes #14983 ( #15320 )
...
* fixes #14983
* allow bootstrapping with 0.20
* added a test case for the new system.add with a sink parameter
* make npeg green again
2020-09-25 08:49:21 +02:00
Andreas Rumpf
4ec5cbac0d
fixes #15361 ( #15401 )
...
* fixes #15361 ; better cursor inference
2020-09-24 15:41:45 +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
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
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
Andreas Rumpf
c38a459582
fixes #14925 ( #14947 )
2020-07-09 17:24:23 +02:00
Araq
b17e1efc67
progress
2020-07-08 10:48:12 +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
394a56650a
Fix #14647 ( #14776 )
...
* Fix #14647
* Correct fix
* Typo and add test
* For real now :p
2020-06-28 17:47:47 +02:00
Clyybber
45d1e55e72
Add testcases for #11811 and #14315 ( #14726 )
...
* Add testcase for #11811
* Add testcase for #14315
2020-06-19 14:56:38 +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
Timothee Cour
63d1a0289e
fix #14421 items uses lent T ( #14447 )
...
* fix #14421 items uses lent T for seq + openArray
* add -d:nimWorkaround14447
* fix test
2020-05-29 17:10:59 +02:00
Andreas Rumpf
3eaa870c0a
ARC/ORC: optimize s.setLen(0) to match the old runtime's behaviour ( #14423 )
2020-05-21 22:38:13 +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
cooldome
fee71d466c
fix #14294 ( #14301 )
...
* fix #14294
* fix orc as well
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-05-11 19:10:54 +02:00
cooldome
eefada8a88
fix #14217 ( #14218 )
...
* fix #14217
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-05-05 07:26:32 +02:00
Araq
87ac28d19a
fixes #14159 [backport:1.2]
2020-05-02 22:31:19 +02:00
Andreas Rumpf
cc60caedb3
fixes #14054 [backport:1.2] ( #14061 )
...
* fixes #14054
* make tests green again
* more tests are green
* maybe now
2020-04-30 06:48:57 +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
065a6af2de
fixes a critical =trace generation bug (see test case) ( #14140 )
2020-04-27 22:20:14 +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
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
bc37668c5a
fixes #13782 ( #13834 )
2020-04-01 20:30:28 +02:00
Miran
8088633250
faster CIs ( #13803 )
...
* 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
2020-03-30 13:18: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
fe7b1dfb2a
rewritten goto based exception handling; much cleaner implementation;… ( #13677 )
...
* rewritten goto based exception handling; much cleaner implementation; fixes #13668
2020-03-17 23:18:43 +01:00
cooldome
35d14095ed
Fixes #13659 ( #13674 )
...
* fixes #13659
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-03-17 16:36:38 +01:00
cooldome
613ea6e85e
fixes #12747 [backport] ( #13651 )
...
* fixes #12747
* fix tests
* improve code style
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-03-16 13:40:40 +01:00
Andreas Rumpf
a6682de004
catchable defects ( #13626 )
...
* 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
2020-03-12 23:44:33 +01:00
Andreas Rumpf
090ba1e3a3
fixes #13436 ( #13615 )
2020-03-10 00:52:46 +01:00
Andreas Rumpf
ec5cef13cf
fixes #13599 ( #13614 )
2020-03-09 18:12:52 +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
Andreas Rumpf
0d219d2c67
fixes #13457 ( #13458 )
2020-02-21 21:06:41 +01:00