Files
Nim/compiler
Araq 3b2e0e08c5 IC: per-module backend emit stage (Phase 2b, B3)
--icBackendStage:emit --icBackendModule:<suffix> renders one module's final
.c from its .c.nif and ic.backend.merge.nif. cnif.renderCFromArtifact walks
the artifact token stream: string literals verbatim, symbols by name, and a
(cdef ...) body is dropped when the name is dead OR it is a 'u' unique
definition this module does not own. The prototype lives in the surrounding
raw text (cgen emits a forward declaration for every used proc regardless of
where the body lands), so a dropped body keeps a valid declaration -- no
synthesis needed.

emit loads the module graph the same way cg does (factored into
loadBackendModules/findTargetModule) so getCFile yields the identical path cg
wrote to -- in particular the main module's source-vs-suffix aliasing.

Validated end-to-end on a 3-module diamond (lib.shared demanded by siblings
a and b at top level): cg all modules, merge, emit all, cc, link. The proc
shared lands in exactly one object (its assigned owner a) and is referenced
(U) from the other -- proc dedup + ownership works at the object level. The
only remaining link failures are DATA (RTTI NTIv2, const tables): those are
emit-everywhere'd as cdata, which is not yet wrapped in a droppable directive
nor given a guaranteed extern in non-owners -- the next unit (data ownership).
koch ic thallo green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 22:37:47 +02:00
..
2026-06-10 12:04:42 +02:00
2023-12-15 10:20:57 +01:00
2026-06-13 10:08:46 +02:00
2025-12-01 22:59:12 +01:00
2026-06-11 10:36:04 +02:00
2026-02-10 13:21:35 +01:00
2026-06-13 10:08:46 +02:00
2026-06-12 12:47:06 +02:00
2026-06-13 10:08:46 +02:00
2026-06-12 12:47:06 +02:00
2026-06-12 16:27:41 +02:00
2026-03-16 16:56:18 +01:00
2025-12-31 13:33:57 +01:00
2026-06-12 06:05:31 +02:00
2017-01-07 22:35:09 +01:00
2026-02-10 13:21:35 +01:00
2026-06-12 12:47:06 +02:00
2025-12-11 18:22:38 +01:00
2025-12-11 18:22:38 +01:00
2026-06-13 10:16:29 +02:00
2026-06-07 19:55:56 +02: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-06-11 10:36:04 +02:00
2026-06-13 10:08:46 +02: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
2026-06-13 10:08:46 +02:00
2026-06-11 10:36:04 +02:00
2021-01-12 09:36:51 +01:00
2026-06-12 16:27:41 +02:00
2026-06-13 10:08:46 +02:00
2026-01-09 13:10:04 +01:00
2026-06-11 10:36:04 +02:00
2026-06-10 12:04:42 +02:00
2026-06-10 12:04:42 +02:00
2026-06-13 10:08:46 +02:00
2025-12-11 18:22:38 +01:00
2026-06-09 16:12:38 +02:00
2026-02-10 13:21:35 +01:00
2023-07-02 22:36:05 +02:00
2023-11-06 18:33:28 +01:00
2026-02-10 13:21:35 +01:00
2026-06-10 12:04:42 +02:00
2026-06-13 10:08:46 +02:00
2025-12-11 18:22:38 +01:00
2026-06-10 12:04:42 +02:00
2026-06-13 10:08:46 +02:00
2025-12-11 18:22:38 +01:00
2025-12-11 18:22:38 +01:00
2026-06-13 10:08:46 +02:00
2026-06-13 10:08:46 +02:00
2026-06-10 12:04:42 +02:00
2026-06-13 10:08:46 +02:00
2025-12-11 18:22:38 +01:00
2024-03-16 08:35:18 +08:00
2025-12-29 13:52:22 +01:00
2025-12-31 13:33:57 +01:00
2026-06-13 10:08:46 +02:00
2026-06-13 10:08:46 +02:00
2026-06-09 16:12:38 +02: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.