From 1749b2b4a3e55db7c9bed95376f99b7f07932b49 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sun, 26 Jul 2026 12:15:33 +0000 Subject: refactor: drop per-type micro handlers and the parallel NamedValues map Integer/Real/Boolean/CharHandler carried only five one-line LLVM API wrappers (now inlined at their call sites in CodeGen.cc) plus dead emitDeclare methods that violated the documented two-table lock-step invariant. StringHandler::emitDeclare (also dead) and its NamedValues reference go too. With the dead writers gone, NamedValues held no information not already in Symbols[].Storage, so the parallel map is removed: getNamedValue reads Symbols, ArrayHandler/FunctionGen take one table, and function bodies save/restore a single map. Behavior unchanged. Co-Authored-By: Claude Fable 5 --- include/cps/FunctionGen.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'include/cps/FunctionGen.h') diff --git a/include/cps/FunctionGen.h b/include/cps/FunctionGen.h index f55db1b..cce17c3 100644 --- a/include/cps/FunctionGen.h +++ b/include/cps/FunctionGen.h @@ -25,7 +25,6 @@ class FunctionGen { llvm::IRBuilder<> &Builder; TypeSystem &Types; - std::map &NamedValues; std::map &Symbols; bool &HadError; @@ -38,10 +37,9 @@ public: llvm::Module &M, llvm::IRBuilder<> &B, TypeSystem &TS, - std::map &NV, std::map &Sym, bool &HadErrorFlag) - : Context(C), Module(M), Builder(B), Types(TS), NamedValues(NV), Symbols(Sym), HadError(HadErrorFlag) {} + : Context(C), Module(M), Builder(B), Types(TS), Symbols(Sym), HadError(HadErrorFlag) {} llvm::Type *getLLVMType(const std::string &TypeName); -- cgit v1.3.1-4-g156e