diff options
Diffstat (limited to 'docs/application/namespace.md')
| -rw-r--r-- | docs/application/namespace.md | 22 |
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 |
