summaryrefslogtreecommitdiff
path: root/docs/type_system
diff options
context:
space:
mode:
Diffstat (limited to 'docs/type_system')
-rw-r--r--docs/type_system/bit.md6
-rw-r--r--docs/type_system/buffer.md2
-rw-r--r--docs/type_system/error.md2
-rw-r--r--docs/type_system/function.md11
-rw-r--r--docs/type_system/index.md2
-rw-r--r--docs/type_system/ir.md17
-rw-r--r--docs/type_system/map.md1
-rw-r--r--docs/type_system/op.md6
-rw-r--r--docs/type_system/queue.md2
-rw-r--r--docs/type_system/select.md4
-rw-r--r--docs/type_system/task.md1
11 files changed, 39 insertions, 15 deletions
diff --git a/docs/type_system/bit.md b/docs/type_system/bit.md
index e30a536..f730563 100644
--- a/docs/type_system/bit.md
+++ b/docs/type_system/bit.md
@@ -18,7 +18,7 @@ Bit[[SIZE_FLAGS | REPRESENTATION_FLAGS]]
```c
typedef struct {
- // EMPTY
+ kpl_interface *interface;
} kpl_type_body_bit;
```
@@ -113,6 +113,10 @@ Bool `alias Bit[[BIT8 | BOOL]]
### Compare `<=>`
+```c
+typedef ssize_t kpl_interface_compare(const kpl_any any_a, const kpl_any any_b);
+```
+
# Char
```text
diff --git a/docs/type_system/buffer.md b/docs/type_system/buffer.md
index f351b4f..554a467 100644
--- a/docs/type_system/buffer.md
+++ b/docs/type_system/buffer.md
@@ -12,7 +12,7 @@ Buffer[[TYPE | UTF8 | UTF16 | UTF32] TYPE]
```c
typedef struct {
- kpl_ptr type;
+ kpl_interface *interface;
} kpl_type_body_buffer;
```
diff --git a/docs/type_system/error.md b/docs/type_system/error.md
index fbd15eb..7931e0e 100644
--- a/docs/type_system/error.md
+++ b/docs/type_system/error.md
@@ -12,7 +12,7 @@ Error[[]]
```c
typedef struct {
- // EMPTY
+ kpl_interface *interface;
} kpl_type_body_error;
```
diff --git a/docs/type_system/function.md b/docs/type_system/function.md
index ed1cf9d..515550a 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 *jit;
+ kpl_ptr ir, body, invocation_list, return_type, var_list;
} kpl_type_body_function;
```
@@ -44,7 +43,7 @@ A function with an incomplete type, type checking occurs at invocation its compl
## Complete
-A function with a complete type, its sync/async invocations are stored in the `INVOCATION_LIST`
+A function with a complete type, it stores it's `IR` and `JIT`
## Native
@@ -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/map.md b/docs/type_system/map.md
index 44cd6cf..839d511 100644
--- a/docs/type_system/map.md
+++ b/docs/type_system/map.md
@@ -11,6 +11,7 @@ Map[[] KEY_TYPE; VALUE_TYPE]
```c
typedef struct {
kpl_ptr key, value;
+ kpl_interface *interface;
} kpl_type_body_map;
```
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
diff --git a/docs/type_system/queue.md b/docs/type_system/queue.md
index 3b17512..800aa43 100644
--- a/docs/type_system/queue.md
+++ b/docs/type_system/queue.md
@@ -10,7 +10,7 @@ Queue[[] TYPE]
```c
typedef struct {
- kpl_ptr type;
+ kpl_interface *interface;
} kpl_type_body_queue;
```
diff --git a/docs/type_system/select.md b/docs/type_system/select.md
index 4ef3bbb..e68fc32 100644
--- a/docs/type_system/select.md
+++ b/docs/type_system/select.md
@@ -12,7 +12,7 @@ Select[[SINGLE | MULTIPLE] Type; Collection[VAR_TREE_LIST; .symbol : %const Valu
```c
typedef struct {
- kpl_ptr type, var_tree, var_list;
+ kpl_ptr var_tree, var_list;
} kpl_type_body_select;
```
@@ -21,7 +21,7 @@ typedef struct {
```text
Enum[Generic.T; Collection[.symbol : %const Value]] `alias Select[[SINGLE]; Generic.T; Collection[VAR_TREE_LIST; .symbol : %const Value]]
-Mask[Generic.T; Collection[.symbol : %const Value]] `alias Select[[MULTIPLE]; Generic.T; Collection[VAR_TREE_LIST; .symbol : %const Value]]
+Mask[Generic.T; Collection[.symbol]] `alias Select[[MULTIPLE]; Generic.T; Collection[VAR_TREE_LIST; .symbol]]
```
## Definition Example
diff --git a/docs/type_system/task.md b/docs/type_system/task.md
index 3561737..ae547b2 100644
--- a/docs/type_system/task.md
+++ b/docs/type_system/task.md
@@ -13,6 +13,7 @@ Task[[] TYPE]
```c
typedef struct {
kpl_ptr type;
+ kpl_interface *interface;
} kpl_type_body_task;
```