aboutsummaryrefslogtreecommitdiff
path: root/AGENTS
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-16 09:44:05 +0000
committer_ov4 <ov4@ov4.org>2026-10-16 09:44:05 +0000
commit2d84c01c1ccbb0a746f103d167ed7f3448b4a349 (patch)
treeeb210b25950e0561fd4c2191f75e1de2629169cd /AGENTS
parent90f691e1e1e5a3803c95b547071f340da5985c09 (diff)
refactor(files): separate runtime I/O helper generation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'AGENTS')
-rw-r--r--AGENTS/ARCH.md1
-rw-r--r--AGENTS/SUBSYSTEMS.md4
2 files changed, 4 insertions, 1 deletions
diff --git a/AGENTS/ARCH.md b/AGENTS/ARCH.md
index 4ceddb5..ca80a4b 100644
--- a/AGENTS/ARCH.md
+++ b/AGENTS/ARCH.md
@@ -271,6 +271,7 @@ do not modify the real release for local verification.
| `lib/CodeGen/Designator.cc` | CodeGen methods for the TYPE system: type pre-pass, `emitLValue`/`loadFromLValue`, `emitCoercedExpr` gate, user-kind binary-op interception |
| `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 |
| `lib/CodeGen/*Handler.cc`, `FunctionGen.cc`, `RuntimeCheck.cc`, `TypeSystem.cc` | Helpers owned by CodeGen (including exception emission) |
| `CMakeLists.txt` | 3 static libs (CPSLexer, CPSParser, CPSCodeGen) + `cpsc`. **New .cc files must be added to the source lists here** |
| `tools/driver/NativeCompiler.cc`, `cmake/NativeCompiler.cmake` | Host object generation, embedded Clang/LLD linking and compressed link resources |
diff --git a/AGENTS/SUBSYSTEMS.md b/AGENTS/SUBSYSTEMS.md
index 54e15ef..bc09f57 100644
--- a/AGENTS/SUBSYSTEMS.md
+++ b/AGENTS/SUBSYSTEMS.md
@@ -82,7 +82,9 @@ and returns 1. Native binaries require the C++ runtime; EmbeddedRunner explicitl
registers its statically linked ABI symbols, while MCJIT manages unwind frames.
This does not change heap-string/array lifetimes or automatically close files.
-**Files** (`FileHandler`): text-file runtime for §9.1. StringHandler-shaped leaf —
+**Files** (`FileHandler`): text-file runtime for §9.1.
+`FileHandler.cc` owns setup, lookup/open and emission entry points;
+`FileRuntimeIO.cc` builds the read/write/close/EOF helpers. StringHandler-shaped leaf —
holds Context/Builder/Module/RuntimeCheck/ExceptionHandler refs only, never sees
CodeGen, AST nodes or the symbol table; `CodeGen::emitStmt`'s four file branches (and the EOF builtin
intercept) evaluate/coerce operands and hand over `llvm::Value*`s plus the statement