-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Compiler module reference
This wiki page was written quickly and may contain information which is out of date or needs to be worded better.
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
Tree structure
contains helpers and debug procedures, which work on symbols, types, and node.
helper for compilers babel support
Helpers for code generator. Set representation as an array of bits
The complement to bitsets. Set representation as an AST
Will be the future. Used to make the C code generator generate code in a much more deterministic fashion.
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.
C code generation for expressions. Divide between stmts and expr mostly historical
A merger for C files which is used for the symbol files feature.
Code generation for statements. See ccgexprs. NOt for for loops, b/c they are eliminated.
Thread variable emulation.
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.
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.
Main file for the C code generation. Includes things like DLL generation, foreign function interface, dispatches to. Cgendata is the main structure.
code generation for methods. Performs AST to AST transformations. Analysis away method look up.
Command line argument processing.
conditional symbols
cyclic redundancy check algorithm. Used by symbol files, recom
Pass which computes dependancies between modules. Able to generate a dot file which can be used.
Old documentation generator, which doesn't use the semantic pass. Doesn't know about symbols and identifiers.
New documenation generator
old evaluation engine, not used anymore
external compiler, describes how the c compiler is invoked.
hashbang filter
helper for common stuff which source code filter.
Growing module. Flow sensitive analysis, mainly for values. Used for not nil checking
High level optimizer. Part of the term-rewriting macro engine.
PIdents. Hash identifiers into a single global hash table
ID generator. Used to create persistant IDs for the symbol files mechanism
The module which has the helpers which deal with the module import mechanism.
Javascript code generator
Pass which changes closures into pairs of function pointers and environments
the lexer
Linked list implementation
low level stream which contains some features which the compiler needs.
helpers for symbol lookup. Quite involved due to templates, overloading, etc.
Quite new module which implements common AST to AST helpers.
compilerproc symbol is used by code generator whic inse
Module handling
Messages, warnings, hints.
configuration file handling
the upcoming virtual machine to evaluate code.
Old lexbase. Buffer handling fo rthe lexer.
Main nimrod file which produces the nimrod executable.
Contains commandline options and checks.
Related to overloading based on AST
auxileries for the parser. Contains verbosity handling.
additional semantic checking.
related to term rewriting macros
start of braces parser
contains information for cross compiling (data type information)
Contains all the pragmas that the compiler support. Use a set approach. Contains one big procedure which parses all the possible pragmas.
Prettifier. Used for case consistancy
used to find the header of a procedure. Used to determine if
able to give a string representation in the AST.
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
utilities for above
Used throughout the code generator
Implements saturated arithmatic for integers.
Main file for the semantic checker
semantic checking for calls
contains the main data structures for semantic checking.
semantic checking for destructors.
semantic checking for expressions.
semantic checking for constant folding. Needed in the semantic pass, since things like bounds checking etc rely on such data.
pass which implements symbol lookups for generics.
instantiation of generics
generates semantic ast checking for macros
magics that need special treatment after overloading resolution.
semantic checking for the upcoming parallel statement
Effect tracking
IDE Tool stuff
very important module. Overloading resolution procedures.
helper for IDE tools
dispatching for what parser or sourcecodefilter to invoke.
old transformation pass. Prepass before the code generator. Mostly deals with for loops into while loops
Helper for ast (should get rid of)
hashtable which works with trees
helper for types
new. Used for the documentation generator so we get names
new virtual machine for compile time evaluation
Intro
Getting Started
- Install
- Docs
- Curated Packages
- Editor Support
- Unofficial FAQ
- Nim for C programmers
- Nim for Python programmers
- Nim for TypeScript programmers
- Nim for D programmers
- Nim for Java programmers
- Nim for Haskell programmers
Developing
- Build
- Contribute
- Creating a release
- Compiler module reference
- Consts defined by the compiler
- Debugging the compiler
- GitHub Actions/Travis CI/Circle CI/Appveyor
- GitLab CI setup
- Standard library and the JavaScript backend
Misc