Document the architecture of Gir
This commit is contained in:
parent
5e3f11b0fa
commit
2cde47e42b
2 changed files with 27 additions and 3 deletions
|
@ -23,9 +23,7 @@ TODO
|
|||
### gir.html
|
||||
* Implement a UI
|
||||
|
||||
### Documentation
|
||||
* Document the overall architecture
|
||||
|
||||
### General
|
||||
* Make Gir use modules
|
||||
* Get this on NPM?
|
||||
* Move into subdirectories?
|
||||
|
|
26
architecture.md
Normal file
26
architecture.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
Compilation pipeline
|
||||
--------------------
|
||||
|
||||
### `compile`
|
||||
`parse` → `optimize`
|
||||
|
||||
Parse produced IR without offsets and optimize produces flattened IR. For
|
||||
more details about Gir's IR, see `ir.md`. For more details about `compile()`
|
||||
see `api.md`
|
||||
|
||||
### `optimize`
|
||||
`joinAdjacentOps` → `transformClearLoops` → `addOffsetProperties` →
|
||||
`transformMultiplyLoops` → `flattenLoops`
|
||||
|
||||
For more details about optimization, see `optimizations.md`
|
||||
|
||||
Interpreter
|
||||
-----------
|
||||
For more details about `newVM()` and `runVM()` see `api.md`
|
||||
|
||||
### `newVM`
|
||||
Created a new VM state object that can be passed to `runVM()`
|
||||
|
||||
### `runVM`
|
||||
Takes a VM state object, executed it, and returns a new VM state object
|
||||
describing the state after execution. The old state object is not modified
|
Loading…
Reference in a new issue