blaise/compiler
Graeme Geldenhuys e723e80063 feat(codegen): target toolkit + registry; register freebsd-x86_64
Introduce TTargetToolkit (Abstract Factory) and TTargetRegistry so per-target
compiler-side objects (native backend + ELF link target) are resolved by name
rather than hard-coded case statements. CreateNativeBackend now delegates to
the registry; adding a target is a new toolkit + one registration with no edits
to existing dispatch.

Registers linux-x86_64 (unchanged behaviour) and freebsd-x86_64 (link target
with EI_OSABI=9; reuses TX86_64Backend since FreeBSD shares the System V AMD64
ABI). FreeBSD codegen/runtime lands in later steps.

The registry uses TOrderedDictionary<string, TTargetToolkit> (name -> toolkit)
per the Generics.Collections policy. It is built publish-after-populate: the
--incremental compile worker pool is threads, so a half-built global would let
a worker wrongly conclude a target has no backend.

Step 0a of docs/native-target-architecture.adoc. Behaviour-preserving:
FIXPOINT_OK, NATIVE_FIXPOINT_OK, NATIVE_INTERNAL_OK, WARMCACHE_FIXPOINT_OK;
full suite 3761 tests green (QBE- and native-built runners).
2026-06-25 14:53:30 +01:00
..
src feat(codegen): target toolkit + registry; register freebsd-x86_64 2026-06-25 14:53:30 +01:00
project.xml Revert defaulting the compiler to Native backend. 2026-06-11 22:53:26 +01:00