Quick overview of all modules

FreeBASIC

Quick overview of all modules
 
(Only somewhat sorted)
fbc
Frontend: main module, entry point, command-line handling, assembling/linking/etc.

objinfo
Object/library information section reader/writer, used by fbc. Includes tiny ELF/COFF object file format readers.

fb
FB parser interface, starts the parser for every input/include file.

parser
Recursive parser, asks lex for tokens, builds up the ast.

lex, pp
Lexer/tokenizer and preprocessor directive parsing.

error
Error reporting functions, used by many parts of fbc, mostly the parser though.

rtl
Helper functions to build up the ast nodes for rtlib/gfxlib function calls. Declarations must match the actual functions in the rtlib/gfxlib2 source code.

symb
Symbols lookup and storage (information on variables/functions), scope/namespace handling, name mangling; used by parser/ast/emitters.

ast
Abstract 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-tac
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.

reg
Register allocator for ir-tac.

emit, emit_SSE, emit_x86
Assembler emitter abstraction and SSE/x86 emitters.

edbg_stab
Stabs debug format emitting for emit_x86.

dstr
Dynamic z/wstrings, used mostly by lex.

hash
Generic hash table, used by symb/fbc.

hlp, hlp-str
Helper functions for all parts of the compiler, plus another implementation of dynamic z/wstrings.

list
Generic 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.

flist
list-based without deletions.

pool
list-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.

stack
Generic list-based stack.