Skip to content

Instantly share code, notes, and snippets.

@Varriount
Last active August 29, 2015 14:02
Show Gist options
  • Save Varriount/a58f39b40f7da93feb8b to your computer and use it in GitHub Desktop.
Save Varriount/a58f39b40f7da93feb8b to your computer and use it in GitHub Desktop.
Module
Aliases.nim - Alias Analysis
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
Ast.nim - Tree structure
Astalgo.nim - contains helpers and debug procedures, which work on symbols, types, and node.
babel.cmd - helper for compilers babel support
bitsets.nim - Helpers for code generator. Set representation as an array of bits
nimsets.nim -
The complement to bitsets. Set representation as an AST
Canonicalizer.nim - Will be the future. Used to make the C code generator generate code in a much more deterministic fashion.
ccgcalls.nim - 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.
cggexpr.nim - C code generation for expressions. Divide between stmts and expr mostly historical
ccgmerge.nim - A merger for C files which is used for the symbol files feature.
ccgstmts.nim - Code generation for statements. See ccgexprs. NOt for for loops, b/c they are eliminated.
ccthreadvars.nim - Thread variable emulation.
ccgtypes.nim - 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.
ccgutils.nim - 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.
cgen.nim - Main file for the C code generation. Includes things like DLL generation, foreign function interface, dispatches to. Cgendata is the main structure.
cgmeth.nim - code generation for methods. Performs AST to AST transformations. Analysis away method look up.
commands.nim - Command line argument processing.
condsyms.nim - conditional symbols
crc.nim - cyclic redundancy check algorithm. Used by symbol files, recom
depends.nim - Pass which computes dependancies between modules. Able to generate a dot file which can be used.
docgen.nim - Old documentation generator, which doesn't use the semantic pass. Doesn't know about symbols and identifiers.
docgen2.nim - New documenation generator
effects.nim -
evalffi.nim -
evals.nim - old evaluation engine, not used anymore
exccomp.nim - external compiler, describes how the c compiler is invoked.
filter_template - hashbang filter
filters - helper for common stuff which source code filter.
syntaxes.nim -
guards.nim - Growing module. Flow sensitive analysis, mainly for values. Used for not nil checking
hlo.nim - High level optimizer. Part of the term-rewriting macro engine.
idents.nim - PIdents. Hash identifiers into a single global hash table
idgen.nim - ID generator. Used to create persistant IDs for the symbol files mechanism
imports.nim - The module which has the helpers which deal with the module import mechanism.
jsgen.nim - Javascript code generator
lambdalifting.nim - Pass which changes closures into pairs of function pointers and environments
lexer.nim - the lexer
lists.nim - Linked list implementation
llstream.nim - low level stream which contains some features which the compiler needs.
lookups.nim - helpers for symbol lookup. Quite involved due to templates, overloading, etc.
lowerings.nim - Quite new module which implements common AST to AST helpers.
magicsyms.nim - compilerproc symbol is used by code generator whic inse
modules.nim - Module handling
message.nim - Messages, warnings, hints.
nimconf.nim - configuration file handling
nimeval.nim - the upcoming virtual machine to evaluate code.
nimlexbase.nim - Old lexbase. Buffer handling fo rthe lexer.
nimrod.nim - Main nimrod file which produces the nimrod executable.
options.nim - Contains commandline options and checks.
parampatterns.nim - Related to overloading based on AST
parseaux.nim - auxileries for the parser. Contains verbosity handling.
sempass2.nim - additional semantic checking.
patterns.nim - related to term rewriting macros
pbraces.nim - start of braces parser
platform.nim - contains information for cross compiling (data type information)
pragmas.nim - Contains all the pragmas that the compiler support. Use a set approach. Contains one big procedure which parses all the possible pragmas.
pretty.nim - Prettifier. Used for case consistancy
procfind.nim - used to find the header of a procedure. Used to determine if
renderer.nim - able to give a string representation in the AST.
rodread.nim - Reader of rod files, the symbol file mechanism
rodutils.nim - utilities for above
ropes.nim - Used throughout the code generator
seterate.nim - Implements saturated arithmatic for integers.
sem.nim - Main file for the semantic checker
semcall.nim - semantic checking for calls
semdata.nim - contains the main data structures for semantic checking.
semdestruct.nim - semantic checking for destructors.
semexprs.nim - semantic checking for expressions.
semfold.nim - semantic checking for constant folding. Needed in the semantic pass, since things like bounds checking etc rely on such data.
semgnrc.nim - pass which implements symbol lookups for generics.
seminst.nim - instantiation of generics
macrosanity.nim - generates semantic ast checking for macros
semmagic.nim - magics that need special treatment after overloading resolution.
semparallel.nim - semantic checking for the upcoming parallel statement
sempass2.nim - Effect tracking
service.nim - IDE Tool stuff
sigmatch.nim - very important module. Overloading resolution procedures.
suggest.nim - helper for IDE tools
syntaxes.nim - dispatching for what parser or sourcecodefilter to invoke.
transf.nim - old transformation pass. Prepass before the code generator. Mostly deals with for loops into while loops
trees.nim - Helper for ast (should get rid of)
treetab.nim - hashtable which works with trees
types.nim - helper for types
typesrenderer.nim - new. Used for the documentation generator so we get names
vm.nim - new virtual machine for compile time evaluation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment