aboutsummaryrefslogtreecommitdiff
path: root/AGENTS/SUBSYSTEMS
diff options
context:
space:
mode:
Diffstat (limited to 'AGENTS/SUBSYSTEMS')
-rw-r--r--AGENTS/SUBSYSTEMS/CLASS_LIFETIME.md4
-rw-r--r--AGENTS/SUBSYSTEMS/MEMORY.md4
-rw-r--r--AGENTS/SUBSYSTEMS/STDLIB.md6
-rw-r--r--AGENTS/SUBSYSTEMS/TEMPLATES.md2
4 files changed, 9 insertions, 7 deletions
diff --git a/AGENTS/SUBSYSTEMS/CLASS_LIFETIME.md b/AGENTS/SUBSYSTEMS/CLASS_LIFETIME.md
index 98693e5..19be0aa 100644
--- a/AGENTS/SUBSYSTEMS/CLASS_LIFETIME.md
+++ b/AGENTS/SUBSYSTEMS/CLASS_LIFETIME.md
@@ -37,7 +37,9 @@ Part of the [subsystem notes](../SUBSYSTEMS.md). Builds on [classes](CLASSES.md)
- Stack lifetimes use a per-function `StackObjects` list saved/restored around function
emission. DECLARE and BYVAL copies share ownership registration, including arrays and
records with class fields.
-- Each record retains the original address, an entry-initialized Alive flag and, for
+- Each record retains its original source line and owning unit so deferred cleanup
+ uses the correct __LIB region, even for globals from another unit. It also retains
+ the original address, an entry-initialized Alive flag and, for
arrays, a runtime element count in an entry slot. Array buffer addresses also live in
entry slots so deferred cleanup never references branch-local bound SSA values.
- Every array registers, even when its elements need no destruction: cleanup runs the
diff --git a/AGENTS/SUBSYSTEMS/MEMORY.md b/AGENTS/SUBSYSTEMS/MEMORY.md
index 40cfe9e..ab752de 100644
--- a/AGENTS/SUBSYSTEMS/MEMORY.md
+++ b/AGENTS/SUBSYSTEMS/MEMORY.md
@@ -14,8 +14,8 @@ C ABI lowering, library call-line hook and exception-aware calls.
- memory.cc owns a linked list of live allocation start addresses. Explicit
MALLOC/REALLOC and keyword NEW share it; STRING/ARRAY internals keep their own
ownership outside the list.
-- Errors print the existing reason with __cps_user_line and throw 0. The #LIB call
- hook supplies the user line, including keyword NEW/DELETE helper calls.
+- Errors print the existing reason with __cps_user_line and throw 0. The call hook
+ supplies the user line from ordinary source positions, including keyword NEW/DELETE helper calls.
- Sizes accept INTEGER and every supported C integer (including _Bool) through
ordinary overloads. Wrappers explicitly cast to unsigned long long; C++ converts
that value to native size_t, preserving the old integer conversion behavior.
diff --git a/AGENTS/SUBSYSTEMS/STDLIB.md b/AGENTS/SUBSYSTEMS/STDLIB.md
index 6c7b14c..07d0959 100644
--- a/AGENTS/SUBSYSTEMS/STDLIB.md
+++ b/AGENTS/SUBSYSTEMS/STDLIB.md
@@ -1,6 +1,6 @@
# Standard library
-Part of the [subsystem notes](../SUBSYSTEMS.md). `#LIB` library units and default
+Part of the [subsystem notes](../SUBSYSTEMS.md). `PP_DEFINE __LIB` library regions and default
import rules: [CONVENTIONS/EXCEPTIONS_AND_UNITS.md](../CONVENTIONS/EXCEPTIONS_AND_UNITS.md).
**Standard library** (`pseudocode-lib/`)
@@ -31,8 +31,8 @@ import rules: [CONVENTIONS/EXCEPTIONS_AND_UNITS.md](../CONVENTIONS/EXCEPTIONS_AN
## STRING and I/O bridging
-- STRING is a #LIB class with a public internal void* handle owning std::string. The
- _string_impl_* C ABI reports __cps_user_line and throws 0 on std::exception.
+- The STRING class is defined under PP_DEFINE __LIB. Its public internal void*
+ handle owns std::string. The _string_impl_* C ABI reports __cps_user_line and throws 0 on std::exception.
- Functions/operators use ordinary resolution; StringValueGen bridges literals, C_STR, C
conversions and file operands.
- C_STRING literals have an adjacent uppercase C suffix.
diff --git a/AGENTS/SUBSYSTEMS/TEMPLATES.md b/AGENTS/SUBSYSTEMS/TEMPLATES.md
index 95d2963..b80f7ed 100644
--- a/AGENTS/SUBSYSTEMS/TEMPLATES.md
+++ b/AGENTS/SUBSYSTEMS/TEMPLATES.md
@@ -57,7 +57,7 @@ callable lookup.
- After all units' statement loops, `drainTemplateBodies` emits queued functions and
class methods through `emitStmt`, repeating for newly requested instances until the
queue is empty. Instantiation depth is limited to 64.
-- `selectUnit` restores the template owner's file, library mode and call hook;
+- `selectUnit` restores the template owner's file, library-line lookup and call hook;
`VisibilityUnit` uses the first requester's transitive visibility, including
requester-defined operators needed by a library template.
- Each body receives the symbol snapshot from the template declaration, preserving