Files
Nim/tests/destructor
Yuriy Glukhov 5fa96ef270 Fixes #3824, fixes #19154, and hopefully #24094. Re-applies #23787. (#24316)
The first commit reverts the revert of #23787.
The second fixes lambdalifting in convolutedly nested
closures/closureiters. This is considered to be the reason of #24094,
though I can't tell for sure, as I was not able to reproduce #24094 for
complicated but irrelevant reasons. Therefore I ask @jmgomez, @metagn or
anyone who could reproduce it to try it again with this PR.

I would suggest this PR to not be squashed if possible, as the history
is already messy enough.

Some theory behind the lambdalifting fix:
- A closureiter that captures anything outside its body will always have
`:up` in its env. This property is now used as a trigger to lift any
proc that captures such a closureiter.
- Instantiating a closureiter involves filling out its `:up`, which was
previously done incorrectly. The fixed algorithm is to use "current" env
if it is the owner of the iter declaration, or traverse through `:up`s
of env param until the common ancestor is found.

---------

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2024-10-18 10:36:41 +02:00
..
2021-03-09 22:50:17 -08:00
2022-10-01 16:46:51 +02:00
2020-01-20 10:41:12 +01:00
2020-09-25 08:49:21 +02:00
2022-10-01 16:46:51 +02:00
2019-03-04 22:44:23 +01:00
2019-11-29 19:46:21 +01:00
2020-05-02 22:31:19 +02:00
2019-07-07 17:17:14 +02:00
2020-11-09 19:24:32 +01:00
2020-04-01 20:30:28 +02:00
2020-06-28 17:47:47 +02:00
2020-03-10 00:52:46 +01:00
2020-07-09 17:24:23 +02:00
2023-06-02 16:03:32 +02:00
2021-03-23 16:30:49 +01:00
2019-04-25 07:59:34 +02:00
2019-05-27 21:29:02 +02:00
2022-07-06 13:06:41 +02:00
2020-03-17 16:36:38 +01:00