Quick overview of all modules
(Only somewhat sorted)
fbc
fbc
Frontend: main module, entry point, command-line handling, assembling/linking/etc.
objinfoObject/library information section reader/writer, used by fbc. Includes tiny ELF/COFF object file format readers.
fbFB parser interface, starts the parser for every input/include file.
parserRecursive parser, asks lex for tokens, builds up the ast.
lex, ppLexer/tokenizer and preprocessor directive parsing.
errorError reporting functions, used by many parts of fbc, mostly the parser though.
rtlHelper functions to build up the ast nodes for rtlib/gfxlib function calls. Declarations must match the actual functions in the rtlib/gfxlib2 source code.
symbSymbols lookup and storage (information on variables/functions), scope/namespace handling, name mangling; used by parser/ast/emitters.
astAbstract syntax tree: per-function code-flow + expressions.
astNew*(): Node creation/tree building, used by the parser.
astLoad*(): First step in emitting, calls ir, called after each function is parsed.
ir, ir-hlc, ir-llvm, ir-tacastNew*(): Node creation/tree building, used by the parser.
astLoad*(): First step in emitting, calls ir, called after each function is parsed.
Intermediate representation interface (using virtual registers) used to emit the ast.
hlc: High level C emitter (high level in comparison to the ASM backend anyways)
llvm: LLVM IR emitter
tac: Three-address-codes module (asm backend), calls emit. Reponsible for register allocation, reusing, spilling.
reghlc: High level C emitter (high level in comparison to the ASM backend anyways)
llvm: LLVM IR emitter
tac: Three-address-codes module (asm backend), calls emit. Reponsible for register allocation, reusing, spilling.
Register allocator for ir-tac.
emit, emit_SSE, emit_x86Assembler emitter abstraction and SSE/x86 emitters.
edbg_stabStabs debug format emitting for emit_x86.
dstrDynamic z/wstrings, used mostly by lex.
hashGeneric hash table, used by symb/fbc.
hlp, hlp-strHelper functions for all parts of the compiler, plus another implementation of dynamic z/wstrings.
listGeneric linked list with built-in memory pool, used a lot. This is often used as pure pooled allocator, for example for AST nodes or symbols.
flistlist-based without deletions.
poollist-based allocator using multiple lists with node sizes ranging from small to large, allowing it to store away strings into the next best fitting chunk to waste as less memory as possible. Used to store away symbol identifiers.
stackGeneric list-based stack.