summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-06-09 14:01:57 -0400
committernodist <kevin.comas.git@gmail.com>2026-06-09 14:01:57 -0400
commit9d6a15b55bc948227401cb0be721e764e8053b50 (patch)
tree01dc5d7f3465436236247987e1882f5ce18d3bba /docs
parenta13b72d789c6e2ee3d94bd1b19aad3dda0aea3c3 (diff)
add name to application
Diffstat (limited to 'docs')
-rw-r--r--docs/application/index.md1
-rw-r--r--docs/application/name.md21
-rw-r--r--docs/application/namespace.md7
-rw-r--r--docs/application/pool.md12
-rw-r--r--docs/type_system/bit.md4
-rw-r--r--docs/type_system/buffer.md2
-rw-r--r--docs/type_system/enum.md9
-rw-r--r--docs/type_system/function.md6
-rw-r--r--docs/type_system/group.md2
-rw-r--r--docs/type_system/index.md2
-rw-r--r--docs/type_system/list.md2
-rw-r--r--docs/type_system/name.md4
-rw-r--r--docs/type_system/namespace.md2
-rw-r--r--docs/type_system/op.md2
-rw-r--r--docs/type_system/overload.md2
-rw-r--r--docs/type_system/shared.md2
-rw-r--r--docs/type_system/symbol.md2
-rw-r--r--docs/type_system/union.md2
-rw-r--r--docs/type_system/var.md4
19 files changed, 62 insertions, 26 deletions
diff --git a/docs/application/index.md b/docs/application/index.md
index 9f316bc..fcc1dad 100644
--- a/docs/application/index.md
+++ b/docs/application/index.md
@@ -13,6 +13,7 @@
* ##### [Interface](./interface.md)
* ##### [Type](./type.md)
* ##### [Pool](./pool.md)
+# ##### [Name](./name.md)
* ##### [Thread](./thread.md)
* ##### [Io](./io.md)
* ##### [Gc](./gc.md)
diff --git a/docs/application/name.md b/docs/application/name.md
new file mode 100644
index 0000000..0fcc669
--- /dev/null
+++ b/docs/application/name.md
@@ -0,0 +1,21 @@
+# Name
+
+---
+
+Each word representing a var, symbol or type gets an `NAME_IDENTIFIER` -> `kpl_name*` associated with it
+
+## Object Definitions
+
+```c
+typedef struct _kpl_name {
+ POOL_HEADER(_kpl_name);
+ uint32_t length;
+ char *c_str[];
+} kpl_name;
+
+static kpl_name *kpl_name_head;
+```
+
+## Lookup and Storage
+
+All `kpl_name*` objects are stored as a tree under `kpl_name_head`
diff --git a/docs/application/namespace.md b/docs/application/namespace.md
index 41d9ee5..63d1f1a 100644
--- a/docs/application/namespace.md
+++ b/docs/application/namespace.md
@@ -22,19 +22,18 @@ typedef struct _kpl_native_namespace {
typedef struct _kpl_file_namespace {
POOL_HEADER(_kpl_file_namespace);
- __Atomic int16_t children;
- uint16_t flags;
+ kpl_type_ptr ast;
kpl_queue *parents;
kpl_buffer *file_name, *file_string;
kpl_export *exports;
- // TODO AST
kpl_task *task;
+ _Atomic size_t children;
} kpl_file_namespace;
typedef struct _kpl_string_namespace {
_Atomic int16_t children;
+ kpl_type_ptr ast;
kpl_buffer *string;
- // TODO AST
kpl_task *task;
} kpl_string_namespace;
```
diff --git a/docs/application/pool.md b/docs/application/pool.md
index 46602bf..f9baac6 100644
--- a/docs/application/pool.md
+++ b/docs/application/pool.md
@@ -11,9 +11,21 @@ typedef struct _kpl_pool_obj {
POOL_HEADER(_kpl_pool_obj);
} kpl_pool_obj;
+typedef strut {
+ _Atomic size_t allocs;
+ kpl_pool_obj *root;
+ pthread_mutex_t mutex;
+} kpl_pool;
+
static kpl_pool_obj *kpl_pool_head;
```
+## Object Size
+
+The max size of an object in the pool is 2 \*\* 32
+
+This allows for 4 aligned bytes after the `POOL_HEADER` macro
+
## List Management
## Tree Management
diff --git a/docs/type_system/bit.md b/docs/type_system/bit.md
index e07c804..18ac6a8 100644
--- a/docs/type_system/bit.md
+++ b/docs/type_system/bit.md
@@ -5,9 +5,9 @@
A sequence of bits that can fit into a general register
```text
-Bit_size `alias Enum[.bit_any; .bit8; .bit16; .bit32; .bit64]
+Bit_size `alias Enum[Void; .bit_any; .bit8; .bit16; .bit32; .bit64]
-Bit_representation `alias Enum[
+Bit_representation `alias Enum[Void
.numeric; .int; .int_unsiged; .int_signed; .float
.utf8; .utf16; .utf32
.bool
diff --git a/docs/type_system/buffer.md b/docs/type_system/buffer.md
index 942bcb1..7e21a21 100644
--- a/docs/type_system/buffer.md
+++ b/docs/type_system/buffer.md
@@ -5,7 +5,7 @@
An sequence of bytes with unknown size and a byte representation
```text
-Buffer_repesentation: Enum[.type; .utf8; .utf16; .utf32]
+Buffer_repesentation: Enum[Void; .type; .utf8; .utf16; .utf32]
Buffer[Buffer_repesentation; TYPE]
```
diff --git a/docs/type_system/enum.md b/docs/type_system/enum.md
index 4762389..6b06849 100644
--- a/docs/type_system/enum.md
+++ b/docs/type_system/enum.md
@@ -5,9 +5,12 @@
A symbol associated with a type
```text
-Enum[Collection[.symbol]] // Resoves to Enum[Void; ...]
+Enum[TYPE; Collection[.symbol : Const[Value]]]
+```
-Enum[TYPE; Collection[.symbol]]
+## Definition Example
-Enum[TYPE; Collection[.symbol : VALUE]]
+```text
+E : Enum[I64; .a; .b; .c]
+`log E Enum[I64; .a : 0; .b : 1; .c : 2]
```
diff --git a/docs/type_system/function.md b/docs/type_system/function.md
index ebd14ea..cd25254 100644
--- a/docs/type_system/function.md
+++ b/docs/type_system/function.md
@@ -3,20 +3,20 @@
---
```text
-Function_class `alias Enum[
+Function_class `alias Enum[Void
.unknown; .incomplete; .native
.task; process; .generator; .iterator; .closure;
.bound;
.regex
]
-Function[Function_class; RETURN_TYPE; Collection[TYPE.SYMBOL]; STATE; List]
+Function[Function_class; STATE; List; RETURN_TYPE; Collection[TYPE.SYMBOL]]
```
# Alias
```text
-Fn[Generic.T; Collection[TYPE.SYMBOL]] `alias Function[Any; Generic.T; Collection[TYPE.SYMBOL]; STATE; List]
+Fn[Generic.T; Collection[TYPE.SYMBOL]] `alias Function[Any; STATE; List; Generic.T; Collection[TYPE.SYMBOL]]
```
# Inline Definition
diff --git a/docs/type_system/group.md b/docs/type_system/group.md
index 45e7dcb..f54de6d 100644
--- a/docs/type_system/group.md
+++ b/docs/type_system/group.md
@@ -5,7 +5,7 @@
A sequence of different types accessed by index or a symbol mapped to an index
```text
-Group_access `alias Enum[.index; .symbol]
+Group_access `alias Enum[Void; .index; .symbol]
Group[Tuple_access; Collection[TYPE.SYMBOL]]
```
diff --git a/docs/type_system/index.md b/docs/type_system/index.md
index 2d39963..8aadc98 100644
--- a/docs/type_system/index.md
+++ b/docs/type_system/index.md
@@ -30,7 +30,7 @@ Generic for alias and unique types, type is replaced with type passed
A list of types with shape of TYPE, only can have one collection per type
-This represents a spread after a type field
+If using a collection the Collection[TYPE] must be the last type on the templates type list
### Void
diff --git a/docs/type_system/list.md b/docs/type_system/list.md
index ae93f1f..618c531 100644
--- a/docs/type_system/list.md
+++ b/docs/type_system/list.md
@@ -3,7 +3,7 @@
---
```text
-List_class `alias Enum[.statement; .define; .action; .loop; .if; .match; .mutation]
+List_class `alias Enum[Void; .statement; .define; .action; .loop; .if; .match; .mutation]
List[List_class; Parent; SCOPE; TARGET; STATEMENTS ...]
```
diff --git a/docs/type_system/name.md b/docs/type_system/name.md
index 343232b..9d24f65 100644
--- a/docs/type_system/name.md
+++ b/docs/type_system/name.md
@@ -3,7 +3,7 @@
---
```text
-Name_class `alias Enum[.unknown; .data; .alias; .unique]
+Name_class `alias Enum[Void; .unknown; .data; .alias; .unique]
-Name[Name_class; TYPE]
+Name[Name_class; TYPE; NAME_IDENTIFIER]
```
diff --git a/docs/type_system/namespace.md b/docs/type_system/namespace.md
index e5b0020..68a84b6 100644
--- a/docs/type_system/namespace.md
+++ b/docs/type_system/namespace.md
@@ -3,7 +3,7 @@
---
```text
-Namespace_class `alias Enum[.native; .file]
+Namespace_class `alias Enum[Void; .native; .file]
Namespace[Namespace_class; EXPORTS; PROCESS]
```
diff --git a/docs/type_system/op.md b/docs/type_system/op.md
index e17868b..6280cc9 100644
--- a/docs/type_system/op.md
+++ b/docs/type_system/op.md
@@ -3,7 +3,7 @@
---
```text
-Op_class `alias Enum[.loop; .if; .match; .mutation; .selection; ...]
+Op_class `alias Enum[Void; .loop; .if; .match; .mutation; .selection; ...]
Op[Op_class; RETURN_TYPE; LEFT_TYPE; RIGHT_TYPE]
```
diff --git a/docs/type_system/overload.md b/docs/type_system/overload.md
index 9fd839e..341a533 100644
--- a/docs/type_system/overload.md
+++ b/docs/type_system/overload.md
@@ -5,7 +5,7 @@
List of complete functions, selected by signature
```text
-Overload[Collection[FNS]]
+Overload[Collection[Function[]]]
```
## Example
diff --git a/docs/type_system/shared.md b/docs/type_system/shared.md
index 82a70d7..dd46afa 100644
--- a/docs/type_system/shared.md
+++ b/docs/type_system/shared.md
@@ -3,7 +3,7 @@
---
```text
-Shared_collector `alias Enum[.unknown; .counting; .tracing]
+Shared_collector `alias Enum[Void; .unknown; .counting; .tracing]
Shared[Shared_collector; TYPE]
diff --git a/docs/type_system/symbol.md b/docs/type_system/symbol.md
index 26b2521..cb0fc11 100644
--- a/docs/type_system/symbol.md
+++ b/docs/type_system/symbol.md
@@ -3,5 +3,5 @@
---
```text
-Symbol[TYPE]
+Symbol[TARGET; TYPE; NAME_IDENTIFIER]
```
diff --git a/docs/type_system/union.md b/docs/type_system/union.md
index 79c4987..2c985e0 100644
--- a/docs/type_system/union.md
+++ b/docs/type_system/union.md
@@ -3,7 +3,7 @@
---
```text
-Union_class `alias Enum[.container; .transient]
+Union_class `alias Enum[Void; .container; .transient]
Union[Union_class; Collection[TYPE.SYMBOL]]
```
diff --git a/docs/type_system/var.md b/docs/type_system/var.md
index 62a7331..12ceace 100644
--- a/docs/type_system/var.md
+++ b/docs/type_system/var.md
@@ -5,7 +5,7 @@
A unique identifier
```text
-Var_class `alias Enum[.arg; .local; .loop; .match]
+Var_class `alias Enum[Void; .arg; .local; .loop; .match]
-Var[Var_class; TYPE; IDENTIFIER]
+Var[Var_class; TYPE; SCOPE; VAR_IDENTIFIER]
```