summaryrefslogtreecommitdiff
path: root/docs/lifecycle
diff options
context:
space:
mode:
Diffstat (limited to 'docs/lifecycle')
-rw-r--r--docs/lifecycle/check.md11
-rw-r--r--docs/lifecycle/ir.md10
-rw-r--r--docs/lifecycle/jit.md25
-rw-r--r--docs/lifecycle/scope.md8
4 files changed, 49 insertions, 5 deletions
diff --git a/docs/lifecycle/check.md b/docs/lifecycle/check.md
index f556230..cdaea80 100644
--- a/docs/lifecycle/check.md
+++ b/docs/lifecycle/check.md
@@ -4,8 +4,13 @@
Type checking
-## Ops
+# Ops
-## Actions
+# Actions
+
+## Branches
+
+# Functions
+
+## Return Type
-## Functions
diff --git a/docs/lifecycle/ir.md b/docs/lifecycle/ir.md
index 08659f0..376189c 100644
--- a/docs/lifecycle/ir.md
+++ b/docs/lifecycle/ir.md
@@ -6,8 +6,18 @@ Convert an AST into a list of 6 address instructions
# Ops
+## Boolean
+
# Actions
+## If
+
+## Loop
+
+## Match
+
+## Mutate
+
# Process
## Tasks
diff --git a/docs/lifecycle/jit.md b/docs/lifecycle/jit.md
index 3ff7079..3ef73e0 100644
--- a/docs/lifecycle/jit.md
+++ b/docs/lifecycle/jit.md
@@ -53,3 +53,28 @@ kpl_x64_inst(INSTRUCTION, [TYPE, VALUE]..., END)
kpl_x64_inst_pfx(PREFIX, INSTRUCTION, [TYPE, VALUE]..., END)
```
+
+# Ir Matching
+
+Use tree with sub trees to match Ir operations to JIT functions
+
+1. Match Name
+2. Match Args until None or End
+3. Run JIT Fn
+
+## Object Definitions
+
+```c
+typedef struct _kpl_ir_match {
+ int32_t tree_weight;
+ union {
+ kpl_ir_name ir_name;
+ kpl_type_header type_header;
+ } match;
+ union {
+ struct _kpl_ir_match *children;
+ void *jit_fn; // TODO
+ } next;
+ struct _kpl_ir_match *tree_left *tree_right;
+} kpl_ir_match;
+```
diff --git a/docs/lifecycle/scope.md b/docs/lifecycle/scope.md
index 68862bc..3310888 100644
--- a/docs/lifecycle/scope.md
+++ b/docs/lifecycle/scope.md
@@ -4,12 +4,14 @@
## Initialize Functions
+## Type Variables
+
+## Link Functions Parents
+
## Link Function Scopes
## Create Vars
-## Link Functions Parents
-
## Initialize Actions
## Split Process Into Tasks by `await`
@@ -19,3 +21,5 @@
On finding an import node add a register task for the imported string
## Initialize Generics
+
+## Resolve Unique And Alias Types