Native Compilation
The native backend targets Windows x86-64 and produces machine-code/object/executable artifacts directly from Semantic/UAST data.
Pipeline
Direct construction
The goal of the direct path is that it does not need an external C/C++ compiler or assembler for normal operation. An assembly route may exist as a verification/cross-check path, but it is not the intended selfhosting dependency.
COFF object artifacts
During bootstrap debugging, each successful Semantic unit can emit one or more COFF objects. Object artifacts are useful because they separate:
- semantic parsing/indexing;
- native lowering;
- object encoding;
- final project linking.
This makes it possible to keep successful work even if another compiler unit fails.
Cross-unit linking
The debug pipeline uses the project’s semantic linker because ordinary COFF staging objects do not necessarily encode every semantic cross-unit identity required by the project model.
Native backend boundaries
Typical fail-closed gaps encountered during selfhosting include:
- unresolved local or captured bindings;
- lost source variable aliases;
- missing structured field layout;
- selector/index chains whose source type was not preserved;
- type switches and switch-case transport gaps;
- external/package constants;
- unsupported effects or ABI behavior.
The bootstrap effort fixes these as general backend capabilities rather than hard-coding one compiler function at a time.