aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-02-27 22:26:35 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commit76d85a10f6cda93eba29dad5372e8160af7289c8 (patch)
treecfec3043ec45a5e83494ec109e87c239dad6cc47 /doc
parent8201cd9f40897cf6b8e6973b28a8661108702ab1 (diff)
Use multiple threads to parse
Diffstat (limited to 'doc')
-rw-r--r--doc/IMPLEMENTATION.md13
-rw-r--r--doc/IMPLEMENTED.md2
2 files changed, 13 insertions, 2 deletions
diff --git a/doc/IMPLEMENTATION.md b/doc/IMPLEMENTATION.md
new file mode 100644
index 0000000..9a0fb4a
--- /dev/null
+++ b/doc/IMPLEMENTATION.md
@@ -0,0 +1,13 @@
+1. In the first stage the parser parses multiple files at the same time using multiple threads.
+2. In the second stage the ast is handled using multiple threads. In this stage, variables, parameters
+and types are defined and resolved and if a type is defined after there is a reference to it,
+then the compiler first resolves that type. There are flags set to make sure there aren't recursive dependencies.
+3. In the third stage the resolved ast is used to create SSA form (static single assignment form). If optimization is
+enabled then then some inlining for ast is done by copying ast from functions to the places they are called from
+before the SSA is created.
+4. In the fourth stage the SSA form is used to create the bytecode. If optimization is enabled then the SSA form
+is optimized before creating the bytecode.
+5. If optimization is enabled then the bytecode is optimized.
+
+Currently implemented:
+None \ No newline at end of file
diff --git a/doc/IMPLEMENTED.md b/doc/IMPLEMENTED.md
deleted file mode 100644
index 2583774..0000000
--- a/doc/IMPLEMENTED.md
+++ /dev/null
@@ -1,2 +0,0 @@
-const main = () {
-} \ No newline at end of file