diff options
| author | nodist <kevin.comas.git@gmail.com> | 2026-07-06 09:44:03 -0400 |
|---|---|---|
| committer | nodist <kevin.comas.git@gmail.com> | 2026-07-06 09:44:03 -0400 |
| commit | 7add85856a927766f218789aa946641228650c02 (patch) | |
| tree | 24de2f1aebf4435e3bef264b9110816cb0e6fa29 /docs/type_system | |
| parent | 482f005ff4a76ec69851e16ab8b332232e9befaa (diff) | |
add IR ast
Diffstat (limited to 'docs/type_system')
| -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 |
4 files changed, 26 insertions, 8 deletions
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 |
