narimiran
de715892ac
fix one more Defect
2022-06-22 10:19:00 +02:00
narimiran
24fb72c8ad
no Defects in Nim 1.2
2022-06-21 12:24:12 +02:00
Ștefan Talpalaru
8ea5475dd9
nimRawSetjmp: support Windows ( #19197 )
...
* nimRawSetjmp: support Windows
Using `_setjmp()` directly is required to avoid some rare (but very
annoying) exception-related stack corruption leading to segfaults on
Windows, with Mingw-w64 and SEH.
More details: https://github.com/status-im/nimbus-eth2/issues/3121
Also add "nimBuiltinSetjmp" - mostly for benchmarking.
* fix for Apple's Clang++
(cherry picked from commit 69aabdab80 )
2021-12-11 05:48:35 +01: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
cooldome
b3176b8817
Attempt to finish off araq cpp exceptions ( #13695 )
...
* config update
* disable a questionable test
* remove c++ exception handling IDs, new impl doesn't require it anymore
* C++ based exceptions finally work
* fixes bootstrapping problem in C++ mode
* teach GCC it's 2020 now
* more bugfixes for C++ based exception handling
* apply cooldome's patch
* another attempt to enable C++11
* bug fix
Co-authored-by: Araq <rumpf_a@web.de >
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-03-19 20:38:25 +01:00
Andreas Rumpf
c3344862b0
--exception:goto switch for deterministic exception handling ( #12977 )
...
This implements "deterministic" exception handling for Nim based on goto instead of setjmp. This means raising an exception is much cheaper than in C++'s table based implementations. Supports hard realtime systems. Default for --gc:arc and the C target because it's generally a good idea and arc is all about deterministic behavior.
Note: This implies that fatal runtime traps are not catchable anymore! This needs to be documented.
2020-01-01 10:01:49 +01:00
Andreas Rumpf
7cb31455ee
fixes #11618 ( #11969 )
2019-08-17 21:19:57 +02:00
Andreas Rumpf
aa4cf92ae8
fixes #11309 ( #11310 )
2019-05-23 19:32:44 +02:00
Timothee Cour
942495611b
revive #10228 ( fix #9880 ) ( #10610 )
...
* Make index out of bounds more useful by including the 'bounds'.
* fixes #9880 index out of bounds (remaining cases); revives #10228
* change err msg to: `index 3 not in 0 .. 1`
2019-02-13 23:30:14 +01:00
LemonBoy
710cfcecd3
Rework exception handling in the VM ( #10544 )
...
* Rework exception handling in the VM
Make the safepoint handling more precise and less forgiving.
The new code is clearer and more commented.
Perform cleanup on `return`.
The no-exception-thrown case in a try block should be slightly faster
since we don't parse the whole set of exceptions every time.
More tests.
* Fix silly error that broke a few tests
* Testament doesn't like files having the same name
* Remove test case that failed compilation to js
2019-02-08 11:57:47 +01:00
LemonBoy
eee9729f53
Fix semantic analysis with noReturn proc in tail pos ( #10422 )
...
Fixes #10417
2019-01-23 07:30:49 +01:00
Timothee Cour
42bac52426
[CI] now enables NIM_COMPILE_TO_CPP=true to run without allow_failures ( #10315 )
...
* better fix for `nim cpp` bootstrap error: error: no member named raise_id
* [CI] now enables runs NIM_COMPILE_TO_CPP=true without allow_failures
* workaround refs #10343
2019-01-17 08:00:44 +01:00
Neelesh Chandola
e77dd683eb
Fix defer not not-working at top level ( #10191 )
2019-01-07 00:51:17 +01:00
Arne Döring
1105d03644
require errormsg to be specified before file.
2018-12-11 21:23:21 +01:00
alaviss
c7eba64dee
don't raise exception in the default handler ( #9783 )
...
fixes #9657
2018-11-22 14:46:07 +01:00
Araq
9a05fd9dcf
disable some tests for the C++ target; refs #7870
2018-11-15 15:10:50 +01:00
cooldome
dfb8730f51
Implements #9434 . Minimal Stacktrace for Exceptions in release mode ( #9480 )
...
* Fixes #9434
2018-10-28 13:40:42 +01:00
Araq
bf01d7136e
Merge branch 'Fixes-7845' of https://github.com/cooldome/Nim into cooldome-Fixes-7845
2018-10-15 11:50:12 +02:00
Araq
420ed0596b
fixes more nil handling regressions
2018-08-13 17:27:44 +02:00
Andreas Rumpf
0926754e68
make tests green again
2018-07-05 15:51:04 +02:00
cooldome
a274d77b55
Fixes
2018-06-12 00:28:09 +01:00
cooldome
7302a8ce7a
Fixes 7845
2018-06-10 22:49:09 +01:00
cooldome
16c1a90857
Cpp codegen: handling of imported exceptions. Fixes #3571 ( #7360 )
2018-04-10 12:14:59 +02:00
cooldome
bcda71a8a7
fixes #7414 ( #7434 )
2018-03-29 09:19:03 +02:00
cooldome
63c28b973e
Allow only single infix as in except branches. Fixes #7115 ( #7132 )
2018-03-08 10:56:32 +01:00
Araq
dd7c166260
make tests green again
2018-02-28 10:13:55 +01:00
Araq
c9f184401c
merged #6512 manually; fixes #6431
2018-02-27 17:43:02 +01:00
cooldome
d24b6667c6
genTryCpp to catch by Nim type, ready for first review ( #7196 )
...
* Rewrite genTryCpp
* correction
* Implement polymorphic raise in cpp
* revert backticks in emit
* Cleanp a comment
* revert test changes
* better handling of <new> header
2018-02-12 21:23:34 +01:00
cooldome
7cbab49645
nested finally bug ( #7207 )
2018-02-12 21:20:49 +01:00
cooldome
12b11fd848
Fix compiler crash on try expression with infix as ( Fixes #7116 ) ( #7112 )
...
* Fix compiler crash
* make sure type is not lost
2018-01-29 05:59:49 +01:00
Arne Döring
000b8afd26
Remove expr/stmt ( #5857 )
2017-07-25 09:28:23 +02:00
Araq
b922347990
make tests green again
2017-07-20 23:33:41 +02:00
Andreas Rumpf
ebba9f06ae
fixes #5871
2017-07-20 18:42:08 +02:00
Araq
30c99a8440
fixes #5628
2017-03-30 12:53:32 +02:00
Dominik Picheta
b7d7feffee
Fixes test.
2017-02-06 22:01:27 +01:00
Dominik Picheta
e01c3561dc
Add template tests for #3691 .
2017-02-06 19:25:09 +01:00
Dominik Picheta
4661ae22dd
Fixes incorrect scoping in semstmts.semTry.
2017-02-06 19:02:51 +01:00
Dominik Picheta
1c233ba27a
More progress towards a working #3691 .
2017-02-03 19:50:22 +01:00
Dominik Picheta
656da1f6a9
WIP: as with generics.
2017-02-02 21:36:49 +01:00
Dominik Picheta
e8c46d29cd
WIP implementation of except ExcType as ident syntax. Refs #3691 .
2017-02-01 00:32:56 +01:00
Yuriy Glukhov
f12f27c185
Fixed getCurrentException and getCurrentExceptionMsg. Closes #4635
2016-08-29 13:10:06 +03:00
Yuriy Glukhov
8bff930c7c
Fixed js codegen issue for uncaught exceptions.
2016-08-27 16:52:08 +03:00
Adam Strzelecki
e80465dacf
tests: Trim .nim files trailing whitespace
...
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:04:32 +02:00
Yuriy Glukhov
842a26317c
Fixed defer test.
2015-08-07 00:20:40 +03:00
Araq
0d8942d45e
destructors now work with overloaded assignment operators; fixes #2811 ; fixes #1632
2015-08-05 21:43:14 +02:00
Araq
c6398d408d
fixes #1888
2015-04-27 23:11:59 +02:00
Araq
5cea6807e1
fixes #2476
2015-04-19 02:43:19 +02:00
Araq
24ae0c387f
some love for the testsuite; fixed regressions
2015-03-01 21:41:21 +01:00
Araq
d7d059a686
more tests green
2014-08-31 17:23:35 +02:00
Audun Wilhelmsen
ef379d0a10
Added test cases for return in except statements.
2014-02-23 00:20:16 +01:00