aboutsummaryrefslogtreecommitdiff
path: root/include/cps/StringHandler.h
AgeCommit message (Collapse)Author
2026-10-13fix: compare strings by content_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-07-26refactor: dedupe StringHandler case-convert and substring-copy code_ov4
emitLCase/emitUCase were a 45-line verbatim pair differing only in the libc callee; both now delegate to emitCaseConvert(Str, CaseFn). The malloc+memcpy+NUL tail duplicated across emitMid/emitRight/emitLeft moves into allocCopySubstring; each function keeps its own clamp logic, which is intentionally different. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26refactor: drop per-type micro handlers and the parallel NamedValues map_ov4
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 <noreply@anthropic.com>
2026-07-26refactor: centralize libc declarations, move '&' concat into StringHandler_ov4
CodeGen declares its own MallocFunc in SetupExternalFunctions and uses it for char->STRING coercion and INPUT STRING buffers, removing two bare getFunction("malloc") calls that null-deref'd if no handler happened to declare malloc first. The CHR branch reuses the char->STRING coercion path instead of a second hand-rolled heap wrapper. String concatenation moves from ArithmeticHandler (which re-declared four externs per '&' and was the LLVM 19 build-pin root cause) to StringHandler::emitConcat; ArithmeticHandler no longer touches the Module. Dead FreeFunc declarations removed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-03-03Added all built-in functions_ov4
2026-02-02Added STRING_ov4