Document the architecture of Gir
This commit is contained in:
parent
5e3f11b0fa
commit
2cde47e42b
|
@ -23,9 +23,7 @@ TODO
|
||||||
### gir.html
|
### gir.html
|
||||||
* Implement a UI
|
* Implement a UI
|
||||||
|
|
||||||
### Documentation
|
|
||||||
* Document the overall architecture
|
|
||||||
|
|
||||||
### General
|
### General
|
||||||
* Make Gir use modules
|
* Make Gir use modules
|
||||||
* Get this on NPM?
|
* Get this on NPM?
|
||||||
|
* Move into subdirectories?
|
||||||
|
|
|
@ -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 New Issue