2014-06-15 19:53:38 +00:00
**This wiki page was written quickly and may contain information which is out of date or needs to be worded better.**
2017-10-16 12:33:29 +00:00
### Module
### aliases.nim - Alias Analysis
2014-06-15 19:53:38 +00:00
Used for term-rewriting macros. Buggy for this purpose because it has been rewritten with something completely different in mind. Analysis is both value and type based. Looks for areas
2017-10-16 12:33:29 +00:00
### ast.nim
2014-06-15 19:53:38 +00:00
Tree structure
2017-10-16 12:33:29 +00:00
### astalgo
2014-06-15 19:53:38 +00:00
contains helpers and debug procedures, which work on symbols, types, and node.
2017-10-16 12:33:29 +00:00
### babel.cmd
2014-06-15 19:53:38 +00:00
helper for compilers babel support
2017-10-16 12:33:29 +00:00
### bitsets
2014-06-15 19:53:38 +00:00
Helpers for code generator. Set representation as an array of bits
2017-10-16 12:33:29 +00:00
### nimsets.nim -
2014-06-15 19:53:38 +00:00
The complement to bitsets. Set representation as an AST
2017-10-16 12:33:29 +00:00
### Canonicalizer
2014-06-15 19:53:38 +00:00
Will be the future. Used to make the C code generator generate code in a much more deterministic fashion.
2017-10-16 12:33:29 +00:00
### ccgcalls
2014-06-15 19:53:38 +00:00
C code generator calls. Generates a call expression in C, objective c, and C++ syntax. What needs to be done is that we often need to translate the result type into a hidden parameter.
2017-10-16 12:33:29 +00:00
### cggexpr
2014-06-15 19:53:38 +00:00
C code generation for expressions. Divide between stmts and expr mostly historical
2017-10-16 12:33:29 +00:00
### ccgmerge
2014-06-15 19:53:38 +00:00
A merger for C files which is used for the symbol files feature.
2017-10-16 12:33:29 +00:00
### ccgstmts
2014-06-15 19:53:38 +00:00
Code generation for statements. See ccgexprs. NOt for for loops, b/c they are eliminated.
2017-10-16 12:33:29 +00:00
### ccthreadvars
2014-06-15 19:53:38 +00:00
Thread variable emulation.
2017-10-16 12:33:29 +00:00
### ccgtypes
2014-06-15 19:53:38 +00:00
complex, b/c deals with types. The PNode's are not cyclic. You can recurse them without any recursion checks. Type generation for the c backend, as well as run time type generation.
2017-10-16 12:33:29 +00:00
### ccgutils
2014-06-15 19:53:38 +00:00
Misc. utilities for C generation code. Contains hash string. Has to be same as system hash string, generate hashes at compile time. Also contains getUniqueType, to be deprecated in place of the canonicalization module.
2017-10-16 12:33:29 +00:00
### cgen.nim
2014-06-15 19:53:38 +00:00
Main file for the C code generation. Includes things like DLL generation, foreign function interface, dispatches to. Cgendata is the main structure.
2017-10-16 12:33:29 +00:00
### cgmeth.nim
2014-06-15 19:53:38 +00:00
code generation for methods. Performs AST to AST transformations. Analysis away method look up.
2017-10-16 12:33:29 +00:00
### commands.nim
2014-06-15 19:53:38 +00:00
Command line argument processing.
2017-10-16 12:33:29 +00:00
### condsyms
2014-06-15 19:53:38 +00:00
conditional symbols
2017-10-16 12:33:29 +00:00
### crc.nim
2014-06-15 19:53:38 +00:00
cyclic redundancy check algorithm. Used by symbol files, recom
2017-10-16 12:33:29 +00:00
### depends.nim
2014-06-15 19:53:38 +00:00
Pass which computes dependancies between modules. Able to generate a dot file which can be used.
2017-10-16 12:33:29 +00:00
### docgen.nim
2014-06-15 19:53:38 +00:00
Old documentation generator, which doesn't use the semantic pass. Doesn't know about symbols and identifiers.
2017-10-16 12:33:29 +00:00
### docgen2.nim
2014-06-15 19:53:38 +00:00
New documenation generator
2017-10-16 12:33:29 +00:00
### effects.nim -
### evalffi.nim -
2014-06-15 19:53:38 +00:00
2017-10-16 12:33:29 +00:00
### evals.nim
2014-06-15 19:53:38 +00:00
old evaluation engine, not used anymore
2017-10-16 12:33:29 +00:00
### exccomp
2014-06-15 19:53:38 +00:00
external compiler, describes how the c compiler is invoked.
2017-10-16 12:33:29 +00:00
### filter_template
2014-06-15 19:53:38 +00:00
hashbang filter
2017-10-16 12:33:29 +00:00
### filters
2014-06-15 19:53:38 +00:00
helper for common stuff which source code filter.
2017-10-16 12:33:29 +00:00
### syntaxes.nim -
2014-06-15 19:53:38 +00:00
2017-10-16 12:33:29 +00:00
### guards -
2014-06-15 19:53:38 +00:00
Growing module. Flow sensitive analysis, mainly for values. Used for not nil checking
2017-10-16 12:33:29 +00:00
### hlo -
2014-06-15 19:53:38 +00:00
High level optimizer. Part of the term-rewriting macro engine.
2017-10-16 12:33:29 +00:00
### idents.nim -
2014-06-15 19:53:38 +00:00
PIdents. Hash identifiers into a single global hash table
2017-10-16 12:33:29 +00:00
### idgen -
2014-06-15 19:53:38 +00:00
ID generator. Used to create persistant IDs for the symbol files mechanism
2017-10-16 12:33:29 +00:00
### imports.nim -
2014-06-15 19:53:38 +00:00
The module which has the helpers which deal with the module import mechanism.
2017-10-16 12:33:29 +00:00
### jsgen -
2014-06-15 19:53:38 +00:00
Javascript code generator
2017-10-16 12:33:29 +00:00
### lambdalifting -
2014-06-15 19:53:38 +00:00
Pass which changes closures into pairs of function pointers and environments
2017-10-16 12:33:29 +00:00
### lexer -
2014-06-15 19:53:38 +00:00
the lexer
2017-10-16 12:33:29 +00:00
### lists -
2014-06-15 19:53:38 +00:00
Linked list implementation
2017-10-16 12:33:29 +00:00
### llstream -
2014-06-15 19:53:38 +00:00
low level stream which contains some features which the compiler needs.
2017-10-16 12:33:29 +00:00
### lookups.nim -
2014-06-15 19:53:38 +00:00
helpers for symbol lookup. Quite involved due to templates, overloading, etc.
2017-10-16 12:33:29 +00:00
### lowerings -
2014-06-15 19:53:38 +00:00
Quite new module which implements common AST to AST helpers.
2017-10-16 12:33:29 +00:00
### magicsyms -
2014-06-15 19:53:38 +00:00
compilerproc symbol is used by code generator whic inse
2017-10-16 12:33:29 +00:00
### modules.nim -
2014-06-15 19:53:38 +00:00
Module handling
2017-10-16 12:33:29 +00:00
### message.nim -
2014-06-15 19:53:38 +00:00
Messages, warnings, hints.
2017-10-16 12:33:29 +00:00
### nimconf -
2014-06-15 19:53:38 +00:00
configuration file handling
2017-10-16 12:33:29 +00:00
### nimeval -
2014-06-15 19:53:38 +00:00
the upcoming virtual machine to evaluate code.
2017-10-16 12:33:29 +00:00
### nimlexbase -
2014-06-15 19:53:38 +00:00
Old lexbase. Buffer handling fo rthe lexer.
2017-10-16 12:33:29 +00:00
### nimrod.nim -
2014-06-15 19:53:38 +00:00
Main nimrod file which produces the nimrod executable.
2017-10-16 12:33:29 +00:00
### options -
2014-06-15 19:53:38 +00:00
Contains commandline options and checks.
2017-10-16 12:33:29 +00:00
### parampatterns -
2014-06-15 19:53:38 +00:00
Related to overloading based on AST
2017-10-16 12:33:29 +00:00
### parseaux -
2014-06-15 19:53:38 +00:00
auxileries for the parser. Contains verbosity handling.
2017-10-16 12:33:29 +00:00
### sempass2 -
2014-06-15 19:53:38 +00:00
additional semantic checking.
2017-10-16 12:33:29 +00:00
### patterns -
2014-06-15 19:53:38 +00:00
related to term rewriting macros
2017-10-16 12:33:29 +00:00
### pbraces -
2014-06-15 19:53:38 +00:00
start of braces parser
2017-10-16 12:33:29 +00:00
### platform.nim -
2014-06-15 19:53:38 +00:00
contains information for cross compiling (data type information)
2017-10-16 12:33:29 +00:00
### pragmas.nim -
2014-06-15 19:53:38 +00:00
Contains all the pragmas that the compiler support. Use a set approach. Contains one big procedure which parses all the possible pragmas.
2017-10-16 12:33:29 +00:00
### pretty.nim -
2014-06-15 19:53:38 +00:00
Prettifier. Used for case consistancy
2017-10-16 12:33:29 +00:00
### procfind -
2014-06-15 19:53:38 +00:00
used to find the header of a procedure. Used to determine if
2017-10-16 12:33:29 +00:00
### renderer -
2014-06-15 19:53:38 +00:00
able to give a string representation in the AST.
2017-10-16 12:33:29 +00:00
### rodread -
2015-05-23 18:02:25 +00:00
Reader of rod files, the symbol file mechanism. It also does module dependency tracking to decide whether a rod file can be used or whether the module needs to be recompiled
2014-06-15 19:53:38 +00:00
2017-10-16 12:33:29 +00:00
### rodutils -
2014-06-15 19:53:38 +00:00
utilities for above
2017-10-16 12:33:29 +00:00
### ropes -
2014-06-15 19:53:38 +00:00
Used throughout the code generator
2017-10-16 12:33:29 +00:00
### seterate.nim -
2014-06-15 19:53:38 +00:00
Implements saturated arithmatic for integers.
2017-10-16 12:33:29 +00:00
### sem.nim -
2014-06-15 19:53:38 +00:00
Main file for the semantic checker
2017-10-16 12:33:29 +00:00
### semcall -
2014-06-15 19:53:38 +00:00
semantic checking for calls
2017-10-16 12:33:29 +00:00
### semdata -
2014-06-15 19:53:38 +00:00
contains the main data structures for semantic checking.
2017-10-16 12:33:29 +00:00
### semdestruct -
2014-06-15 19:53:38 +00:00
semantic checking for destructors.
2017-10-16 12:33:29 +00:00
### semexprs -
2014-06-15 19:53:38 +00:00
semantic checking for expressions.
2017-10-16 12:33:29 +00:00
### semfold -
2014-06-15 19:53:38 +00:00
semantic checking for constant folding. Needed in the semantic pass, since things like bounds checking etc rely on such data.
2017-10-16 12:33:29 +00:00
### semgnrc -
2014-06-15 19:53:38 +00:00
pass which implements symbol lookups for generics.
2017-10-16 12:33:29 +00:00
### seminst -
2014-06-15 19:53:38 +00:00
instantiation of generics
2017-10-16 12:33:29 +00:00
### macrosanity -
2014-06-15 19:53:38 +00:00
generates semantic ast checking for macros
2017-10-16 12:33:29 +00:00
### semmagic -
2014-06-15 19:53:38 +00:00
magics that need special treatment after overloading resolution.
2017-10-16 12:33:29 +00:00
### semparallel -
2014-06-15 19:53:38 +00:00
semantic checking for the upcoming parallel statement
2017-10-16 12:33:29 +00:00
### sempass2 -
2014-06-15 19:53:38 +00:00
Effect tracking
2017-10-16 12:33:29 +00:00
### service.nim -
2014-06-15 19:53:38 +00:00
IDE Tool stuff
2017-10-16 12:33:29 +00:00
### sigmatch -
2014-06-15 19:53:38 +00:00
very important module. Overloading resolution procedures.
2017-10-16 12:33:29 +00:00
### suggest.nim -
2014-06-15 19:53:38 +00:00
helper for IDE tools
2017-10-16 12:33:29 +00:00
### syntaxes -
2014-06-15 19:53:38 +00:00
dispatching for what parser or sourcecodefilter to invoke.
2017-10-16 12:33:29 +00:00
### transf -
2014-06-15 19:53:38 +00:00
old transformation pass. Prepass before the code generator. Mostly deals with for loops into while loops
2017-10-16 12:33:29 +00:00
### trees.nim -
2014-06-15 19:53:38 +00:00
Helper for ast (should get rid of)
2017-10-16 12:33:29 +00:00
### treetab -
2014-06-15 19:53:38 +00:00
hashtable which works with trees
2017-10-16 12:33:29 +00:00
### types -
2014-06-15 19:53:38 +00:00
helper for types
2017-10-16 12:33:29 +00:00
### typesrenderer -
2014-06-15 19:53:38 +00:00
new. Used for the documentation generator so we get names
2017-10-16 12:33:29 +00:00
### vm.nim -
2014-06-15 19:53:38 +00:00
new virtual machine for compile time evaluation