Quick overview of all modules

(Only somewhat sorted)

Frontend: main module, entry point, command-line handling, assembling/linking/etc.

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

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

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

lex, pp
Lexer/tokenizer and preprocessor directive parsing.

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

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.

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

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.

Register allocator for ir-tac.

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

Stabs debug format emitting for emit_x86.

Dynamic z/wstrings, used mostly by lex.

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.

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.

list-based without deletions.

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.

Generic list-based stack.

Back to FreeBASIC Developer Information

Back to Table of Contents
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki

sf.net phatcode