summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-07-10 15:14:36 -0400
committernodist <kevin.comas.git@gmail.com>2026-07-10 15:14:36 -0400
commit20106935981d50971da0a7708a5bfdbec256049c (patch)
treea8f117787719de25813814b46ceb3e27c6541cfc /docs
parent4b46d1e1b306a8573113aa971c5f8811256e2bd0 (diff)
array methods and return qualifier
Diffstat (limited to 'docs')
-rw-r--r--docs/application/index.md7
-rw-r--r--docs/application/memory.md2
-rw-r--r--docs/application/thread.md2
-rw-r--r--docs/application/type.md18
-rw-r--r--docs/language/index.md2
-rw-r--r--docs/lifecycle/check.md4
-rw-r--r--docs/type_system/buffer.md16
-rw-r--r--docs/type_system/function.md8
-rw-r--r--docs/type_system/union.md2
9 files changed, 52 insertions, 9 deletions
diff --git a/docs/application/index.md b/docs/application/index.md
index e315baf..6c84525 100644
--- a/docs/application/index.md
+++ b/docs/application/index.md
@@ -34,9 +34,8 @@
1. Configuration
* `thread_count` - defaults to number of available processors
-2. Initialize tasks
2. Initialize allocators
- * Slab sizes
+3. Initialize tasks
4. Initialize types
* Built In Alias
5. Initialize IO
@@ -65,5 +64,5 @@
1. Clean up IO
2. Clean up types
-3. Clean up allocators
-4. Clean up tasks
+3. Clean up tasks
+4. Clean up allocators
diff --git a/docs/application/memory.md b/docs/application/memory.md
index 44a3786..e180b24 100644
--- a/docs/application/memory.md
+++ b/docs/application/memory.md
@@ -25,7 +25,7 @@ Requires a ring buffer for each power of two
```c
#define KPL_DYANMIC_OBJ_MIN_BITS 7
-#define KPL_DYNAMIC_OBJ_MAX_BITS 27
+#define KPL_DYNAMIC_OBJ_MAX_BITS 30
#define KPL_DYNAMIC_OBJ_MIN_SIZE (1 << KPL_DYANMIC_OBJ_MIN_BITS)
diff --git a/docs/application/thread.md b/docs/application/thread.md
index 6d3f76f..956c8ff 100644
--- a/docs/application/thread.md
+++ b/docs/application/thread.md
@@ -37,7 +37,7 @@ typedef struct {
typedef struct {
kpl_task_queue queue;
- _Atomic ssize_t priority;
+ _Atomic size_t priority;
sem_t counter;
pthread_t thread;
} kpl_thread;
diff --git a/docs/application/type.md b/docs/application/type.md
index 40546c1..bb9534b 100644
--- a/docs/application/type.md
+++ b/docs/application/type.md
@@ -9,11 +9,12 @@ typedef enum : uint8_t {
// ...
} kpl_type_template;
-typedef enum {
+typedef enum : uint8_t {
CONST = 1 << 0,
EMPTY = 1 << 1,
REF = 1 << 2,
- SHARED = 1 << 3
+ SHARED = 1 << 3,
+ RETURN = 1 << 4
} kpl_type_qualifiers;
typedef union {
@@ -32,5 +33,16 @@ typedef struct {
kpl_type_body body;
} kpl_type;
-// TODO SLAB WITH POOL
+uint16_t array_index, slab_count;
+
+typedef struct _kpl_type_slab {
+ struct _kpl_type_slab *next;
+ kpl_type array[UINT16_MAX];
+} kpl_type_slab;
+
+kpl_type_slab *type_slab;
+
+kpl_ptr type_pool;
+
+kpl_mutex type_mutex;
```
diff --git a/docs/language/index.md b/docs/language/index.md
index 4fdccb6..85d1a04 100644
--- a/docs/language/index.md
+++ b/docs/language/index.md
@@ -170,6 +170,8 @@ Arguments are specified with a `[]` at the beginning of the `{}`
@ condition {[args] statements }
+@ (value; condition; increment) {[value] statements }
+
@.name condition { statements }
@.name condition {[args] statements }
diff --git a/docs/lifecycle/check.md b/docs/lifecycle/check.md
index 39290c3..cb52ca8 100644
--- a/docs/lifecycle/check.md
+++ b/docs/lifecycle/check.md
@@ -10,6 +10,10 @@ Type checking
# Complete Function Definitions
+A function with its arguments and return type defined
+
# Incomplete Function Definitions
+Check if the function's arguments are all typed, if they are the functions return type can be inferred and set as a complete function
+
Can only type check on invocation, check if invocation is in the `INVOCATION_LIST` if not add new invocation
diff --git a/docs/type_system/buffer.md b/docs/type_system/buffer.md
index 554a467..d38dd88 100644
--- a/docs/type_system/buffer.md
+++ b/docs/type_system/buffer.md
@@ -44,6 +44,22 @@ Array[Generic.T] `alias Buffer[[TYPE] Generic.T]
## ``split`
+## ``array`
+
+```text
+array : SIZE `array ([U64.index] index)
+```
+
+## ``map`
+
+## ``each`
+
+In place map
+
+## ``filter`
+
+## ``reduce`
+
## Concatenate `,`
# Iterating
diff --git a/docs/type_system/function.md b/docs/type_system/function.md
index 515550a..d972b57 100644
--- a/docs/type_system/function.md
+++ b/docs/type_system/function.md
@@ -89,6 +89,14 @@ Invoked regular expression matcher
## \`return
+The return operation type is Void with the `%return` qualifier
+
+```text
+%return Void
+```
+
+This qualifier is used when type checking branches that should return value, indicating this branch is valid
+
## Transient Union Return Chaining
# Iterating
diff --git a/docs/type_system/union.md b/docs/type_system/union.md
index f4b0b04..1bc84da 100644
--- a/docs/type_system/union.md
+++ b/docs/type_system/union.md
@@ -68,3 +68,5 @@ z // is value if y is not zero
### \`error
### \`null
+
+Can take a TYPE as a parameter