summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-06-08 17:52:05 -0400
committernodist <kevin.comas.git@gmail.com>2026-06-08 17:52:05 -0400
commit168e070965aa2d98326b297d10339c4ad131c560 (patch)
tree0203c6d2066898361c938d63d7909b9547938924 /docs
parentca458bfcd65c3a094fd0721cb5cd9f74dee5f845 (diff)
add gc and shared as a qualifier type
Diffstat (limited to 'docs')
-rw-r--r--docs/application/gc.md12
-rw-r--r--docs/application/index.md1
-rw-r--r--docs/application/type.md12
-rw-r--r--docs/language/index.md2
-rw-r--r--docs/type_system/bit.md4
-rw-r--r--docs/type_system/index.md8
6 files changed, 33 insertions, 6 deletions
diff --git a/docs/application/gc.md b/docs/application/gc.md
new file mode 100644
index 0000000..7353db9
--- /dev/null
+++ b/docs/application/gc.md
@@ -0,0 +1,12 @@
+# Garbage Collection
+
+---
+
+## Object Definition
+
+```c
+typedef struct _kpl_gc_count {
+ _Atomic size_t ref_count;
+ kpl_any any;
+} kpl_gc_count;
+```
diff --git a/docs/application/index.md b/docs/application/index.md
index 68bd1a1..f4a013b 100644
--- a/docs/application/index.md
+++ b/docs/application/index.md
@@ -15,6 +15,7 @@
* ##### [Pool](./pool.md)
* ##### [Thread](./thread.md)
* ##### [Io](./io.md)
+* ##### [Gc](./gc.md)
* ##### [Tuple](./tuple.md)
* ##### [Buffer](./buffer.md)
* ##### [Map](./map.md)
diff --git a/docs/application/type.md b/docs/application/type.md
index 77c567d..a89302e 100644
--- a/docs/application/type.md
+++ b/docs/application/type.md
@@ -15,16 +15,26 @@ typedef struct {
static const kpl_type_ptr kpl_type_ptr_null = { UINT16_MAX, UINT16_MAX };
-typedef enum : uint16_t {
+typedef enum : uint8_t {
// ...
} kpl_type_template;
+typedef enum : uint8_t {
+ CONST = 1 << 0
+ EMPTY = 1 << 1,
+ REF = 1 << 2,
+ SHARED = 1 << 3,
+ COUTING = 1 << 4,
+ TRACING = 1 << 5
+} kpl_type_flags;
+
typedef union {
// ...
} kpl_type_body;
typedef struct {
kpl_type_template template;
+ kpl_type_flags flags;
_Atomic unt16_t ref_count;
kpl_type_ptr self, prev, next, parent;
kpl_type_body body;
diff --git a/docs/language/index.md b/docs/language/index.md
index 5d1b31f..8925f96 100644
--- a/docs/language/index.md
+++ b/docs/language/index.md
@@ -121,7 +121,7 @@ Type[arg]
## Destructuring
```text
-v : Tuple(1; 2; 3)
+v : Tuple $ (1; 2; 3)
v [a; b; c]
`log a // I64.a $ 1
`log b // I64.b $ 2
diff --git a/docs/type_system/bit.md b/docs/type_system/bit.md
index 5f7aa8e..e07c804 100644
--- a/docs/type_system/bit.md
+++ b/docs/type_system/bit.md
@@ -104,3 +104,7 @@ Bool `alias Bit[.bit8; .bool]
### ``bit_ls`
### ``bit_rs`
+
+## Other
+
+### Compare `<=>`
diff --git a/docs/type_system/index.md b/docs/type_system/index.md
index 36d1142..eb788d4 100644
--- a/docs/type_system/index.md
+++ b/docs/type_system/index.md
@@ -50,8 +50,6 @@ Denotes that a field that does not resolve to anything
* #### [Native](./native.md)
-* #### [Shared](./shared.md)
-
* #### [Error](./error.md)
## Qualifier Templates
@@ -60,10 +58,10 @@ Denotes that a field that does not resolve to anything
* #### [Empty](./empty.md)
-* #### [Lock](./lock.md)
-
* #### [Ref](./ref.md)
+* #### [Shared](./shared.md)
+
## Function Templates
* #### [Var](./var.md)
@@ -86,4 +84,6 @@ Denotes that a field that does not resolve to anything
* #### [List](./list.md)
+* #### [Lock](./lock.md)
+
* #### [Namespace](./namespace.md)