diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/application/index.md | 8 | ||||
| -rw-r--r-- | docs/application/interface.md | 2 | ||||
| -rw-r--r-- | docs/language/operators.md | 2 | ||||
| -rw-r--r-- | docs/lifecycle/check.md | 10 | ||||
| -rw-r--r-- | docs/lifecycle/eval.md | 2 | ||||
| -rw-r--r-- | docs/lifecycle/exec.md | 3 | ||||
| -rw-r--r-- | docs/lifecycle/import.md | 2 | ||||
| -rw-r--r-- | docs/lifecycle/ir.md | 5 | ||||
| -rw-r--r-- | docs/lifecycle/jit.md | 55 | ||||
| -rw-r--r-- | docs/lifecycle/notify.md | 3 | ||||
| -rw-r--r-- | docs/lifecycle/parse.md | 2 | ||||
| -rw-r--r-- | docs/lifecycle/scope.md | 2 | ||||
| -rw-r--r-- | docs/type_system/function.md | 9 | ||||
| -rw-r--r-- | docs/type_system/index.md | 2 | ||||
| -rw-r--r-- | docs/type_system/ir.md | 17 | ||||
| -rw-r--r-- | docs/type_system/op.md | 6 |
16 files changed, 118 insertions, 12 deletions
diff --git a/docs/application/index.md b/docs/application/index.md index 40a03b8..01287b1 100644 --- a/docs/application/index.md +++ b/docs/application/index.md @@ -52,10 +52,10 @@ 4. ##### [Import](../lifecycle/import.md) 5. ##### [Check](../lifecycle/check.md) 6. ##### [Eval](../lifecycle/eval.md) -7. ##### Ir -8. ##### Jit -9. ##### Exec -10. ##### Notify +7. ##### [Ir](../lifecycle/ir.md) +8. ##### [Jit](../lifecycle/jit.md) +9. ##### [Exec](../lifecycle/exec.md) +10. ##### [Notify](../lifecycle/notify.md) ## Shutdown diff --git a/docs/application/interface.md b/docs/application/interface.md index 790c155..831090b 100644 --- a/docs/application/interface.md +++ b/docs/application/interface.md @@ -64,3 +64,5 @@ typdef struct { #define KPL_PTR_NULL (kpl_ptr) { .slab_index = UINT16_MAX, .array_index = UINT16_MAX } ``` + +## `kpl_interface` diff --git a/docs/language/operators.md b/docs/language/operators.md index 85ca162..35e39c3 100644 --- a/docs/language/operators.md +++ b/docs/language/operators.md @@ -20,6 +20,8 @@ Configurable logger, output format and destination can be changed Thread_id `unique I32 ``` +## ``thread_count` + ## ``format` ```text diff --git a/docs/lifecycle/check.md b/docs/lifecycle/check.md index 3e8177e..31685e1 100644 --- a/docs/lifecycle/check.md +++ b/docs/lifecycle/check.md @@ -1,3 +1,13 @@ # Check --- + +Type checking + +# Ops + +# Actions + +# Complete Function Definitions + +# Incomplete Function Invocations diff --git a/docs/lifecycle/eval.md b/docs/lifecycle/eval.md index 8572f21..11081a6 100644 --- a/docs/lifecycle/eval.md +++ b/docs/lifecycle/eval.md @@ -1,3 +1,5 @@ # Eval --- + +Reduce AST size by evaluating expressions diff --git a/docs/lifecycle/exec.md b/docs/lifecycle/exec.md new file mode 100644 index 0000000..edab443 --- /dev/null +++ b/docs/lifecycle/exec.md @@ -0,0 +1,3 @@ +# Exec + +--- diff --git a/docs/lifecycle/import.md b/docs/lifecycle/import.md index bf7635d..669e67b 100644 --- a/docs/lifecycle/import.md +++ b/docs/lifecycle/import.md @@ -1,3 +1,5 @@ # Import --- + +Find each import node and wait for the import to complete life cycle, then get a copy of its `export_tree` diff --git a/docs/lifecycle/ir.md b/docs/lifecycle/ir.md new file mode 100644 index 0000000..5db8091 --- /dev/null +++ b/docs/lifecycle/ir.md @@ -0,0 +1,5 @@ +# Ir + +--- + +Convert an AST into a list of 3 address instructions diff --git a/docs/lifecycle/jit.md b/docs/lifecycle/jit.md new file mode 100644 index 0000000..3243385 --- /dev/null +++ b/docs/lifecycle/jit.md @@ -0,0 +1,55 @@ +# Jit + +--- + +Convert Ir Into X64 (X86_64) + +## Limitations + +#### No Segmentation Registers + +#### No X87 Support + +#### No access to the upper 8 bits of the lower 16 bits of registers AX, BX, CX, DX + +## Required Implicit Registers + +Instructions that implicitly modify a register now require the register as an operation + +# Operation + +Each instruction is written with varardic c functions with `TYPE`, `DATA` syntax + +## TYPE + +### General Registers Width + +### General Register Addresses Width + +### General Register Scale + +### General Register Id + +### General Register Memory Displacement + +### XMM Registers + +### MM Registers + +### Immediate Value + +### Relative Address + +### Label + +## DATA + +## Object Definitions + +```c +kpl_x64_lable(label) + +kpl_x64_inst(INSTRUCTION, [TYPE, VALUE]..., END) + +kpl_x64_inst_pfx(PREFIX, INSTRUCTION, [TYPE, VALUE]..., END) +``` diff --git a/docs/lifecycle/notify.md b/docs/lifecycle/notify.md new file mode 100644 index 0000000..2db3b27 --- /dev/null +++ b/docs/lifecycle/notify.md @@ -0,0 +1,3 @@ +# Notify + +--- diff --git a/docs/lifecycle/parse.md b/docs/lifecycle/parse.md index c9da979..1016a28 100644 --- a/docs/lifecycle/parse.md +++ b/docs/lifecycle/parse.md @@ -35,3 +35,5 @@ On type completion look up if type is a builtin ## Define `[]` ## Action `{}` + +# Operation diff --git a/docs/lifecycle/scope.md b/docs/lifecycle/scope.md index 849c52d..37ca355 100644 --- a/docs/lifecycle/scope.md +++ b/docs/lifecycle/scope.md @@ -10,6 +10,8 @@ Traverse AST and: ## Initialize Functions +## Split Process Into Tasks by `await` + ## Register Imports On finding an import node add a register task for the imported string diff --git a/docs/type_system/function.md b/docs/type_system/function.md index ed1cf9d..3847941 100644 --- a/docs/type_system/function.md +++ b/docs/type_system/function.md @@ -6,20 +6,19 @@ MODE: INCOMPLETE | COMPLETE -INVOCATION : SYNC | ASYNC - STATELESS : NATIVE | NATIVE_INLINE | PROCESS | GENERATOR | REGEX_GENERATOR STATEFUL : TASK | ITERATOR | CLOSURE | BOUND | REGEX -Function[[MODE | INVOCATION | STATELESS | STATEFUL]; INVOCATION_LIST; Body; RETURN_TYPE; Collection[VAR_LIST; TYPE.SYMBOL]] +Function[[MODE | STATELESS | STATEFUL]; JIT; IR; Body; INVOCATION_LIST; RETURN_TYPE; Collection[NAME_LIST; TYPE.SYMBOL]] ``` ## Type Body Object Definitions ```c typedef struct { - kpl_ptr body, return_type, var_list; + void *code; + kpl_ptr ir, body, invocations, return_type, var_list; } kpl_type_body_function; ``` @@ -52,7 +51,7 @@ Native C code that can be called async ## Native Inline -Native C code that cannot be called async +Native C code that cannot be called async, has to be inline ## Task diff --git a/docs/type_system/index.md b/docs/type_system/index.md index 4c2fe73..456be2f 100644 --- a/docs/type_system/index.md +++ b/docs/type_system/index.md @@ -113,3 +113,5 @@ Denotes that a field that does not resolve to anything * #### [Lock](./lock.md) * #### [Namespace](./namespace.md) + +* #### [Ir](./ir.md) diff --git a/docs/type_system/ir.md b/docs/type_system/ir.md new file mode 100644 index 0000000..5593bc3 --- /dev/null +++ b/docs/type_system/ir.md @@ -0,0 +1,17 @@ +# Ir + +--- + +```text +Ir[[IR_NAME] Address[3]] +``` + +`IR_NAME` is a single value + +## Type Body Object Definitions + +```c +typedef struct { + kpl_ptr address[3]; +} kpl_type_body_ir; +``` diff --git a/docs/type_system/op.md b/docs/type_system/op.md index 79f0953..f9b2173 100644 --- a/docs/type_system/op.md +++ b/docs/type_system/op.md @@ -5,12 +5,12 @@ ```text Op[[OP_NAME] RETURN_TYPE; LEFT_TYPE; RIGHT_TYPE] ``` + +`OP_NAME` a single value + ## Type Body Object Definitions ```c typedef struct { kpl_ptr return_type, statement_left, statement_right; } kpl_type_body_op; -``` - -The `OP_NAME` a single value |
