Clyybber
1b093d7ec7
Fix #14911 ( #14922 ) [backport]
...
* Fix #14911
* Add testcase
* Fix test
(cherry picked from commit 5bd2da3f64 )
2020-07-21 15:40:24 +02:00
Andreas Rumpf
2c64868764
warn about observerable stores but don't prevent them for 1.2.2 [backport:1.2]; refs https://github.com/nim-lang/RFCs/issues/230 ( #14510 )
...
(cherry picked from commit 52c3633223 )
2020-06-01 13:39:16 +02:00
narimiran
957e74e99e
correctly backport #14496
2020-06-01 13:38:04 +02:00
Andreas Rumpf
97c68d9446
fixes #14498 [backport:1.2] ( #14503 )
...
(cherry picked from commit 7ccc7d7e93 )
2020-06-01 12:15:28 +02:00
Andreas Rumpf
aec0d583d1
fixes #14495 [backport:1.2] ( #14496 )
...
(cherry picked from commit 3105909f88 )
2020-06-01 12:15:15 +02:00
Andreas Rumpf
acc3879c54
fixes #14126 [backport:1.2] ( #14390 )
...
* fixes #14126 [backport:1.2]
* used more logic to optimize it further; updated Nimble version
(cherry picked from commit 16003bffe1 )
2020-05-20 09:04:49 +02:00
Clyybber
c3ecd38da1
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
(cherry picked from commit 9f78f116b2 )
2020-05-19 12:12:45 +02:00
cooldome
a7ebbad8cf
fix #14219 ( #14225 )
...
Co-authored-by: cooldome <ariabushenko@bk.ru >
(cherry picked from commit a39123c93c )
2020-05-19 12:12:45 +02:00
Clyybber
d60a01e513
Fix the DFA for "unstructured controlflow" ( #14263 )
...
* Fix the DFA for "unstructured controlflow"
* Add testcase from #14233
(cherry picked from commit 42db75c970 )
2020-05-18 22:21:56 +02:00
cooldome
8cb8cb7861
Implements RFCs #209 ( #13995 )
...
* add test
* add changelod entry
Co-authored-by: cooldome <ariabushenko@bk.ru >
(cherry picked from commit 9295251e68 )
2020-05-18 22:16:07 +02:00
narimiran
d2d401c657
disable the new fragile test in 'tosproc.nim'
2020-05-14 09:58:15 +02:00
Timothee Cour
01f42a5933
fix a critical bug in windows.osproc leading to resource leaks and blocking IO [backport] ( #14296 )
...
(cherry picked from commit d11cb9d495 )
2020-05-13 08:15:24 +02:00
Andreas Rumpf
2977a31654
destructors: don't produce stupid code for 'cast' ( #14208 ) [backport:1.2]
...
* destructors: don't produce stupid code for 'cast'
* fixes #14207
(cherry picked from commit b6fb609e0d )
2020-05-06 17:20:07 +02:00
Araq
a5d0950eb0
fixes #14159 [backport:1.2]
...
(cherry picked from commit 87ac28d19a )
2020-05-06 17:13:34 +02:00
Andreas Rumpf
62b9dcb8db
fixes #13698 [backport:1.2] ( #14175 )
...
(cherry picked from commit 89be5be03e )
2020-05-06 17:09:21 +02:00
Andreas Rumpf
ff90206332
fixes #14054 [backport:1.2] ( #14061 )
...
* fixes #14054
* make tests green again
* more tests are green
* maybe now
(cherry picked from commit cc60caedb3 )
2020-05-06 17:09:07 +02:00
Andreas Rumpf
49decbf4b4
fixes #14079 [backport:1.2] ( #14163 )
...
(cherry picked from commit d9e907c0e2 )
2020-05-06 17:08:32 +02:00
Timothee Cour
b8573064e0
fix nim CI; fix local testament ( #14102 )
...
(cherry picked from commit d5b7e9902c )
2020-04-25 15:17:57 +02:00
Timothee Cour
dbf35e2ac3
fix https://github.com/nim-lang/RFCs/issues/211 : var a: DateTime compiles and is usable ( #14002 ) [backport:1.2]
...
* fix https://github.com/nim-lang/RFCs/issues/211 : `var a: DateTime` works
* assertValidDate checks for sentinel month
(cherry picked from commit e3919b658f )
2020-04-23 18:44:03 +02:00
cooldome
9d667306df
fix #14007 ( #14012 ) [backport]
...
Co-authored-by: cooldome <ariabushenko@bk.ru >
(cherry picked from commit d839eb9352 )
2020-04-23 18:43:50 +02:00
cooldome
605d395ace
fixes #14003 ( #14006 ) [backport:1.2]
...
Co-authored-by: cooldome <ariabushenko@bk.ru >
(cherry picked from commit f10689d3d4 )
2020-04-23 18:43:35 +02:00
cooldome
9ef1acac64
fix #13909 ( #13914 ) [backport:1.2]
...
Co-authored-by: cooldome <ariabushenko@bk.ru >
(cherry picked from commit f86fc5316a )
2020-04-14 07:30:24 +02:00
Timothee Cour
f34779c289
fix #13902 distinct uint64 type corruption on 32-bit with borrow ( #13907 ) [backport:1.2]
...
* fix #13902 distinct uint64 type corruption on 32-bit with borrow
Co-authored-by: Timothee Cour <timothee.cour2+lightsail@gmail.com >
(cherry picked from commit 95fd8ae93c )
2020-04-14 07:30:14 +02:00
Clyybber
078df45e99
Fix #13889 with testcase ( #13896 ) [backport]
...
* Fix https://github.com/nim-lang/Nim/issues/13889
* Add testcase
* Reduce test time
Co-authored-by: Elie Zedeck RANDRIAMIANDRIRAY <elie.zedeck@gmail.com >
(cherry picked from commit 92c4aad205 )
2020-04-14 07:30:06 +02:00
Timothee Cour
0d59ec9b54
fix https://github.com/timotheecour/Nim/issues/88 ( #13865 ) [backport:1.2]
...
(cherry picked from commit f1fd3ef7f4 )
2020-04-14 07:29:37 +02:00
Timothee Cour
d23371fdd7
std/byaddr => std/decls ( #13847 )
2020-04-03 09:03:13 +02:00
Andreas Rumpf
d01245e501
renamed new std/pragmas.nim to std/byaddr.nim ( #13844 )
...
* renamed new std/pragmas.nim to std/byaddr.nim
* minor code cleanup
2020-04-02 11:52:31 +02:00
Andreas Rumpf
bc37668c5a
fixes #13782 ( #13834 )
2020-04-01 20:30:28 +02:00
Zahary Karadjov
be95f8fdfa
Turn some of the errors back into warnings
2020-04-01 19:38:44 +02:00
Zahary Karadjov
ce9a4ed124
Replace tfHasRequiresInit with a more accurate mechanism
...
The new mechanism can deal with more complex scenarios such as
not nil field appearing in a non-default case object branch or
a field within a generic object that may depend on a when branch.
The commit also plugs another hole: the user is no longer able
to create illegal default values through seq.setLen(N).
2020-04-01 19:38:44 +02:00
Zahary Karadjov
e63b673ce2
Fix https://github.com/nim-lang/Nim/issues/4907
2020-04-01 19:38:44 +02:00
Zahary Karadjov
06438ed143
Close https://github.com/nim-lang/Nim/issues/11428
2020-04-01 19:38:44 +02:00
Zahary Karadjov
4f3d309fb0
Perform nil checks during object construction and within compiles()
...
Close https://github.com/nim-lang/Nim/issues/6494
2020-04-01 19:38:44 +02:00
Zahary Karadjov
7b7e42be54
More precise error messages for uninitialized fields in the presence of inheritance
2020-04-01 19:38:44 +02:00
Zahary Karadjov
0521f98486
Hrm, the new errors highlighted some code that seems to be broken
...
New issue: since `Table[A, B]` allocates its backing storage with
`newSeq[KeyValuePair[A, B]]`, it's no longer legal to create a table
with `not nil` types used as either keys or values.
2020-04-01 19:38:44 +02:00
Zahary Karadjov
f3be5a716f
not nil types are illegal to construct through default(T)
2020-04-01 19:38:44 +02:00
Zahary Karadjov
1b570f2b18
Turn the warning for uninitialized (result) variables into errors
2020-04-01 19:38:44 +02:00
Zahary Karadjov
e0bb78553a
Fix tests/notnil/tnotnil_in_objconstr.nim
2020-04-01 19:38:44 +02:00
Zahary Karadjov
8ae48292ff
Plug another hole: default(T) forbidden for objects requiring initialization
2020-04-01 19:38:44 +02:00
Zahary Karadjov
05a0ec4adb
Don't allow 'var x: T' for objects that require initialization
2020-04-01 19:38:44 +02:00
Zahary Karadjov
7652aede41
More sophistication; Allow requiresInit to be specified per-field
2020-04-01 19:38:44 +02:00
Zahary Karadjov
a8b6222c86
First steps, the compiler can boot with enforced requiresInit
2020-04-01 19:38:44 +02:00
cooldome
c70b3952ff
fixes #13810 ( #13821 )
...
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-03-31 21:15:06 +02:00
Andreas Rumpf
9134bb9cfb
macros for proc types, macros for types ( #13778 )
...
* new minor feature: macros for proc types, to be documented
* Finished the implementation and added tests
* [skip ci] Describe the new custom pragmas in the manual and the changelog
Co-authored-by: Zahary Karadjov <zahary@gmail.com >
2020-03-31 21:14:05 +02:00
c-blake
b1aa3b1eea
Unwind just the "pseudorandom probing" part of recent sets,tables changes ( #13816 )
...
* Unwind just the "pseudorandom probing" (whole hash-code-keyed variable
stride double hashing) part of recent sets & tables changes (which has
still been causing bugs over a month later (e.g., two days ago
https://github.com/nim-lang/Nim/issues/13794 ) as well as still having
several "figure this out" implementation question comments in them (see
just diffs of this PR).
This topic has been discussed in many places:
https://github.com/nim-lang/Nim/issues/13393
https://github.com/nim-lang/Nim/pull/13418
https://github.com/nim-lang/Nim/pull/13440
https://github.com/nim-lang/Nim/issues/13794
Alternative/non-mandatory stronger integer hashes (or vice-versa opt-in
identity hashes) are a better solution that is more general (no illusion
of one hard-coded sequence solving all problems) while retaining the
virtues of linear probing such as cache obliviousness and age-less tables
under delete-heavy workloads (still untested after a month of this change).
The only real solution for truly adversarial keys is a hash keyed off of
data unobservable to attackers. That all fits better with a few families
of user-pluggable/define-switchable hashes which can be provided in a
separate PR more about `hashes.nim`.
This PR carefully preserves the better (but still hard coded!) probing
of the `intsets` and other recent fixes like `move` annotations, hash
order invariant tests, `intsets.missingOrExcl` fixing, and the move of
`rightSize` into `hashcommon.nim`.
* Fix `data.len` -> `dataLen` problem.
2020-03-31 19:18:45 +02:00
Timothee Cour
19cab9fa51
stacktraces can now show custom runtime msgs per frame ( #13351 )
...
* stacktraces can now show custom runtime msgs
* improve tests/stdlib/tstackframes.nim
* fix test for --gc:arc
* test --stacktraceMsgs:on and --stacktraceMsgs:off
* --stacktracemsgs:off by default
2020-03-30 13:45:32 +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
2a278f6eba
'.push raises: []' now also affects proc types ( #13776 )
...
* '.push raises: []' now also affects proc types
* fixes the regression
* less disruptive bugfix
* another attempt
2020-03-29 22:00:18 +02:00
Timothee Cour
cfa1a827dc
fix #13730 ( #13787 )
2020-03-28 08:51:16 +01:00
Arne Döring
142c59fc37
fix typos and deprecation warnings for tconvariancerules.nim ( #13772 )
2020-03-27 08:36:21 +01:00