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