| Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
- MID/RIGHT/LEFT integer args now coerced at call sites (RIGHT(s, n/2)
no longer emits invalid IR); drop emitLeft's private conversion
- FOR loop direction decided at run time via select on STEP sign;
descending FOR works, STEP evaluated once per iteration
- ArrayHandler: extract emitCheckedIndices/loadElement; index count is
validated before emission, fixing a compiler-crash (vector OOB UB) on
OUTPUT with too many indices
- Error contract: Lexer/Parser/CodeGen track errors; all silent failure
paths now print Error: diagnostics with line numbers; unterminated
char literal no longer truncates the rest of the program; module is
verified with verifyModule; driver exits non-zero on any error
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
|
|
|
|
|
|
|
|
|
|