blaise/compiler
Graeme Geldenhuys 93596d135c fix(toolchain): rename TToolKind.tkAs to tkGnuAs to remove enum ambiguity
`tkAs` was a member of two enums: TToolKind (uToolchain, ordinal 1) and
uLexer.TTokenKind (the lexer token enum, ordinal 40).  In ResolveAssembler,
the bare assignment `Result.Kind := tkAs` should bind to TToolKind, but
bare-member resolution is cross-unit order-fragile and could bind it to
TTokenKind.tkAs (ordinal 40) instead.  40 is out of range for the 4-member
TToolKind, so any downstream code that switches or indexes on the resolved
Kind runs off the end into a wild pointer — a layout-sensitive crash that
manifested intermittently in the test runner (a metaclass typeinfo symbol
truncation surfacing as a SIGSEGV during teardown).

Renaming the member to tkGnuAs removes the ambiguity entirely: `tkAs` now
exists only in uLexer.TTokenKind.  This is bootstrap-safe (no qualified-enum
syntax, which the release binary does not yet support).  Verified the
ResolveAssembler codegen now bakes Ord(tkGnuAs)=1 (was 40).
2026-06-30 01:44:17 +01:00
..
src fix(toolchain): rename TToolKind.tkAs to tkGnuAs to remove enum ambiguity 2026-06-30 01:44:17 +01:00
project.xml refactor(rtl): relocate RTL units into the compiler tree (dotted-flat names) 2026-06-25 16:05:44 +01:00