Files
Nim/compiler
ringabout e39272eaa8 fixes #25637; nim ic with destructors (#25723)
fixes #25637

This pull request refactors the way the `sfInjectDestructors` flag is
set on symbols during lambda lifting in the Nim compiler. The main
change is the introduction of a helper procedure to encapsulate the
logic for marking symbols that require destructor injection, improving
code clarity and maintainability.

Refactoring and code quality improvements:

* Introduced the `markInjectDestructors` procedure to encapsulate the
logic for marking a symbol with the `sfInjectDestructors` flag, ensuring
that `backendEnsureMutable` is always called before modifying the
symbol's flags.
* Replaced direct flag manipulation (`owner.incl sfInjectDestructors`
and `prc.incl sfInjectDestructors`) with calls to the new
`markInjectDestructors` procedure in multiple locations, including
`makeClosure`, `createTypeBoundOpsLL`, and `rawClosureCreation`.
[[1]](diffhunk://#diff-19193904ba011a2bcc1e1a9768a7eb57cac57a274cad73d388149776ec2901e6L231-R235)
[[2]](diffhunk://#diff-19193904ba011a2bcc1e1a9768a7eb57cac57a274cad73d388149776ec2901e6L243-R247)
[[3]](diffhunk://#diff-19193904ba011a2bcc1e1a9768a7eb57cac57a274cad73d388149776ec2901e6L639-R643)
2026-04-10 15:29:20 +02:00
..
2023-12-15 10:20:57 +01:00
2025-12-01 22:59:12 +01:00
2026-02-10 13:21:35 +01:00
2026-04-02 07:19:43 +02:00
2026-04-02 07:19:43 +02:00
2026-04-02 07:19:43 +02:00
2026-04-02 07:19:43 +02:00
2026-04-02 07:19:43 +02:00
2026-04-02 07:19:43 +02:00
2025-12-11 18:22:38 +01:00
2026-03-16 16:56:18 +01:00
2025-12-31 13:33:57 +01:00
2017-01-07 22:35:09 +01:00
2026-02-10 13:21:35 +01:00
2025-12-11 18:22:38 +01:00
2025-12-11 18:22:38 +01:00
2025-12-11 18:22:38 +01:00
2026-03-07 15:10:01 +01:00
2025-11-25 12:49:23 +01:00
2026-04-02 07:19:43 +02:00
2024-12-27 19:42:18 +01:00
2026-04-02 07:19:43 +02:00
2025-12-11 18:22:38 +01:00
2026-04-02 07:19:43 +02:00
2025-12-11 18:22:38 +01:00
2021-01-12 09:36:51 +01:00
2026-01-09 13:10:04 +01:00
2026-02-10 13:21:35 +01:00
2025-12-11 18:22:38 +01:00
2026-01-07 13:45:26 +01:00
2025-12-11 18:22:38 +01:00
2026-01-24 06:07:41 +01:00
2026-02-10 13:21:35 +01:00
2023-07-02 22:36:05 +02:00
2026-01-24 06:07:41 +01:00
2023-11-06 18:33:28 +01:00
2026-02-10 13:21:35 +01:00
2025-12-11 18:22:38 +01:00
2025-12-11 18:22:38 +01:00
2025-12-11 18:22:38 +01:00
2025-12-11 18:22:38 +01:00
2025-12-11 18:22:38 +01:00
2026-04-09 11:09:34 +02:00
2025-12-11 18:22:38 +01:00
2024-03-16 08:35:18 +08:00
2026-02-10 13:21:35 +01:00
2025-12-29 13:52:22 +01:00
2025-12-31 13:33:57 +01:00
2026-02-10 13:21:35 +01:00
2023-12-25 07:12:54 +01:00

Nim Compiler

  • This directory contains the Nim compiler written in Nim.
  • Note that this code has been translated from a bootstrapping version written in Pascal.
  • So the code is not a poster child of good Nim code.

See Internals of the Nim Compiler for more information.