summaryrefslogtreecommitdiff
path: root/docs/application/namespace.md
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-06-09 18:37:35 -0400
committernodist <kevin.comas.git@gmail.com>2026-06-09 18:37:35 -0400
commit2ed2fbbc6f233f8aedf14e5d064451c3dea90d87 (patch)
tree1fb763551926b18b43b1e310e6babe46c870c9f6 /docs/application/namespace.md
parent9d6a15b55bc948227401cb0be721e764e8053b50 (diff)
tracing gc only
Diffstat (limited to 'docs/application/namespace.md')
-rw-r--r--docs/application/namespace.md22
1 files changed, 16 insertions, 6 deletions
diff --git a/docs/application/namespace.md b/docs/application/namespace.md
index 63d1f1a..df4dc59 100644
--- a/docs/application/namespace.md
+++ b/docs/application/namespace.md
@@ -8,11 +8,9 @@
typedef struct _kpl_export {
POOL_HEADER(_kpl_export);
kpl_type_ptr type;
- kpl_buffer *name;
- kpl_class *class;
} kpl_export;
-static kpl_export *export_head;
+static queue *export_storage;
typedef struct _kpl_native_namespace {
POOL_HEADER(_kpl_native_namespace);
@@ -20,6 +18,8 @@ typedef struct _kpl_native_namespace {
kpl_export *exports;
} kpl_native_namespace;
+static kpl_native_namespace *native_namespace_head;
+
typedef struct _kpl_file_namespace {
POOL_HEADER(_kpl_file_namespace);
kpl_type_ptr ast;
@@ -27,17 +27,27 @@ typedef struct _kpl_file_namespace {
kpl_buffer *file_name, *file_string;
kpl_export *exports;
kpl_task *task;
- _Atomic size_t children;
+ _Atomic int32_t children;
} kpl_file_namespace;
+static kpl_file_namespace *file_namespace_head;
+
typedef struct _kpl_string_namespace {
- _Atomic int16_t children;
- kpl_type_ptr ast;
kpl_buffer *string;
kpl_task *task;
+ kpl_type_ptr ast;
+ _Atomic int32_t children;
} kpl_string_namespace;
```
+Each `NAMESPACE_IDENTIFIER` maps to `kpl_native_namespace*` or `kpl_file_namespace*` depending on `Namespace_class`
+
+## Lookup and Storage
+
+The native and namespace objects are stored as a tree under `native_namespace_head` and `file_namespace_head`
+
+The exports are stored under a tree for both the native and namespace objects
+
# Registering
## Native