aboutsummaryrefslogtreecommitdiff
path: root/AGENTS
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-16 09:46:18 +0000
committer_ov4 <ov4@ov4.org>2026-10-16 09:46:18 +0000
commit522742e9df7fc5ac596ce4aa53d41b31e4f6a030 (patch)
treea00d9513f02995b418b442d9fb9396ea7e601ad3 /AGENTS
parent533d95d4b54ff2139468d38a7162e5ca3a40a7f6 (diff)
refactor(codegen): separate type checks from designator access
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'AGENTS')
-rw-r--r--AGENTS/ARCH.md2
-rw-r--r--AGENTS/SUBSYSTEMS.md4
2 files changed, 4 insertions, 2 deletions
diff --git a/AGENTS/ARCH.md b/AGENTS/ARCH.md
index a8813e9..663ed40 100644
--- a/AGENTS/ARCH.md
+++ b/AGENTS/ARCH.md
@@ -268,7 +268,7 @@ do not modify the real release for local verification.
| `lib/CodeGen/CodeGen.cc` | Initialization, symbols, call arguments and main() compilation |
| `lib/CodeGen/ExpressionGen.cc`, `StatementGen.cc`, `ControlFlowGen.cc` | Expression/statement dispatch and control-flow emission |
| `lib/CodeGen/ValueTypeGen.cc`, `OutputGen.cc`, `Builtins.h` | Expression typing, coercion/declarations, scalar output and the shared builtin table |
-| `lib/CodeGen/Designator.cc` | CodeGen methods for the TYPE system: type pre-pass, `emitLValue`/`loadFromLValue`, `emitCoercedExpr` gate, user-kind binary-op interception |
+| `lib/CodeGen/Designator.cc`, `TypeCheckGen.cc` | TYPE pre-pass and lvalue access; type admission and user-kind binary operators |
| `lib/CodeGen/CTypeGen.cc` | CodeGen methods for native C scalar conversions, casts, arithmetic and input/output |
| `lib/CodeGen/NativeTypeSystem.cc` | Builtin registration, native C type imports/aliases and scalar promotion |
| `lib/CodeGen/FileHandler.cc`, `FileRuntimeIO.cc` | File runtime setup/lookup/open and call entry points; read/write/close/EOF helper bodies |
diff --git a/AGENTS/SUBSYSTEMS.md b/AGENTS/SUBSYSTEMS.md
index d1ae721..f693b1c 100644
--- a/AGENTS/SUBSYSTEMS.md
+++ b/AGENTS/SUBSYSTEMS.md
@@ -38,7 +38,9 @@ compile error (no extern is fabricated). Body emission is inverted: CodeGen inje
`StmtEmitter` callback, and must restore its own insert point (and the exchanged
ArrayTable) afterwards.
-**User types** (`TypeSystem` + `Designator.cc`): TYPE declarations are top-level only
+**User types** (`TypeSystem` + `Designator.cc` + `TypeCheckGen.cc`):
+`Designator.cc` owns the type pre-pass and lvalue access; `TypeCheckGen.cc` owns
+type admission and user-kind binary operators. TYPE declarations are top-level only
and registered by `CodeGen::runTypePrePass` in two passes — `declareUserType` reserves
every name (records become opaque named structs, so pointer pointees may
forward-reference: `TYPE NodePtr = ^Node` before `TYPE Node`), then