ringabout
b5f5b74fc8
enable vtable implementation for C++ and make it an experimental feature ( #23004 )
...
follow up https://github.com/nim-lang/Nim/pull/22991
- [x] turning it into an experimental feature
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2023-11-30 14:05:45 +01:00
ringabout
30cf33f04d
rework the vtable implementation embedding the vtable array directly with new strictions on methods ( #22991 )
...
**TODO**
- [x] fixes changelog
With the new option `nimPreviewVtables`, `methods` are confined in the
same module where the type of the first parameter is defined
- [x] make it opt in after CI checks its feasibility
## In the following-up PRs
- [ ] in the following PRs, refactor code into a more efficient one
- [ ] cpp needs special treatments since it cannot embed array in light
of the preceding limits: ref
https://github.com/nim-lang/Nim/pull/20977#discussion_r1035528927 ; we
can support cpp backends with vtable implementations later on the
comprise that uses indirect vtable access
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2023-11-28 15:11:43 +01:00
ringabout
2e070dfc76
fixes #22673 ; Cannot prove that result is initialized for a placehold… ( #22915 )
...
…er base method returning a lent
fixes #22673
2023-11-06 19:36:26 +01:00
ringabout
0bacdf5fdf
fixes #20515 ; base method requires explicit {.gcsafe.} to be GC-safe ( #20574 )
...
* fixes #20515 ; base requires explicit `{.gcsafe.}` to be GC-safe
* add tests
2022-10-16 13:20:05 +02:00
ringabout
e0c1159fb3
fixes #20391 ; make of operator work with generics for ORC ( #20395 )
2022-09-21 10:29:39 +02:00
metagn
86f7f4ffa5
remove deprecated type pragma syntax, fix bugs that required it ( #20199 )
...
* remove deprecated pragma syntax from 0.20.0
closes #4651 , closes #16653 with a cheap fix for now due to
how early `tfFinal` is set
* remove type pragma between name and generics
* undo removal, try removing bind expression (0.8.14)
* fix test, unremove bind expr
* remove again
* Update changelog.md
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
* dependencies @ HEAD & weave test dependencies
* try fix package ci
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
2022-09-03 09:52:13 +02:00
flywind
8bfc396a4d
fixes #18612 ; apply cache and memcmp for methods in arc/orc ( #19749 )
...
* try using endsWith
* use memcmp
* add cache
* cleanup
* better
* minor
* fix
* improve test coverage for methods with ARC
2022-04-26 20:14:39 +02:00
cooldome
58b9191354
fix #16516 method dispatch for sink args ( #16594 )
...
* fix #16516
* fix comment
* Trigger build
2021-01-06 10:47:03 +00: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
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
Miran
1551fff853
clean up deprecated stuff and unused imports in tests ( #13059 )
2020-01-07 09:49:08 +01:00
Andreas Rumpf
e68adca0c9
fixes #6777 ( #11347 )
2019-05-28 22:00:01 +02:00
Andreas Rumpf
ef8ddef47b
fixes #10912 ( #11317 )
...
* fixes #10912
* update the tutorial examples
2019-05-24 18:33:53 +02:00
Miran
afeca3d9fe
multi-methods need to be explicitly enabled ( #10856 )
...
* multi-methods need to be explicitly enabled
* update changelog, manual and tutorial
2019-03-18 08:21:37 +01:00
Timothee Cour
ab72d68ec8
fix off by 1 error in col shown by toFileLineCol ( #10138 )
...
* fix off by 1 error in `col` shown by toFileLineCol
* fix test failures
2018-12-31 15:42:01 +01:00
Araq
0d99ff6113
testament megatest: furher refactorings making more tests green
2018-12-11 21:23:24 +01:00
Andreas Rumpf
ac785b0623
testament: joinable is now an explicit concept of a test spec
2018-12-11 21:23:24 +01:00
Arne Döring
1105d03644
require errormsg to be specified before file.
2018-12-11 21:23:21 +01:00
Miran
1b17c9f693
More descriptive names of test files ( #9531 )
...
* change generic `tissues` name to more specific
* change `tvarious` to more specific names
2018-10-29 17:07:27 +01:00
Miran
749dbce4c6
Merge tests into a larger file (part 5 of ∞) ( #9368 )
...
* merge magics
* merge metatype tests
* merge method tests
* merge objects tests
* change `import future` to `import sugar`
Nim in Action tests are left with `import future`, to ensure compatibility.
* merge overload tests
* merge proc tests
* merge procvar tests
* merge range tests
* merge seq tests
* merge sets tests
* remove wrong assert from `tsets3`
* fix `jsTests`
* better fix
2018-10-16 10:50:10 +02:00
Araq
7ac1e6e528
fixes #5479
2018-10-02 23:31:39 +02:00
Andreas Rumpf
0926754e68
make tests green again
2018-07-05 15:51:04 +02:00
Andreas Rumpf
87f548c5f4
make more tests green
2018-04-30 02:56:19 +02:00
Andreas Rumpf
f151b7efd1
added missing test for methods
2017-09-28 21:52:23 +02:00
Arne Döring
52f092d02b
Lineinfo change ( #6084 )
2017-07-17 08:12:15 +02:00
Araq
d91d338d03
fixes #5432
2017-02-26 00:32:07 +01:00
Araq
fa98edc78c
another attempt to make test green again
2017-02-24 15:52:52 +01:00
Andreas Rumpf
bc9015df50
make tests green again
2016-11-24 11:48:23 +01:00
Andreas Rumpf
f5fa5dae85
generic multi-methods should work now
2016-07-28 20:23:24 +02:00
trustable-code
3c557a0144
fix issue #3550
2015-12-24 00:07:03 +01:00
Araq
aa36e73ecf
fixes #3431 , fixes #3370 , fixes #3468
2015-10-25 02:22:50 +01:00
Aman Gupta
82a04051bb
fix failure in tests/method/tmapper.nim
...
FAIL: tmapper.nim
Test "tests/method/tmapper.nim" in category "method"
Failure: reMsgsDiffer
Expected:
invalid declaration order; cannot attach 'step' to method defined here: tmapper.nim(22,7)
Gotten:
invalid declaration order; cannot attach 'step' to method defined here: tests/method/tmapper.nim(22,7)
2015-09-30 20:13:38 -07:00
Araq
b1a55d83ec
added missing test
2015-09-06 02:32:39 +02:00
Araq
dc047931bb
fixes #2590 ; methods now require a .base annotation
2015-09-06 02:31:28 +02: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
Araq
94f2d639b1
fixes #2401
2015-03-25 13:05:32 +01:00
Araq
105a0616a9
implemented procCall builtin
2014-11-28 02:43:41 +01:00
Reimer Behrends
ce9a57fcfd
Fix dispatcher creation for method prototypes.
...
When method prototypes were involved (e.g. forward declarations
for mutual recursion), calls were sometimes dispatched to the
wrong method implementation. One of the reasons was that method
dispatchers were then not always attached to method ASTs in
the correct place.
2014-11-02 23:35:41 +01:00
Reimer Behrends
bce2d57d95
Added test case for recursive methods.
2014-11-02 15:37:16 +01:00
Clay Sweetser
ce5a494927
Changed tests and tools to use 'discard' statements instead of 'nil' for empty blocks.
2014-02-15 18:57:03 -05:00
Araq
20b5f31c03
new tester; all tests categorized
2014-01-13 02:10:03 +01:00