aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/ExpressionGen.cc
AgeCommit message (Collapse)Author
2026-10-30refactor(strings): construct string values implicitly from raw literals_ov4
Keep double-quoted literals and text constants as C_STRING values. Use marked STRING constructors for text and CHAR conversion, preserving string operations and I/O through the existing class machinery. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30feat(types): support implicit single-argument constructors_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27refactor(memory)!: move allocation functions into memory.cps_ov4
Route keyword NEW and DELETE through the same library runtime and retain allocation tracking, runtime diagnostics and exception behavior. BREAKING CHANGE: -no-std programs using NEW or DELETE must explicitly import memory.cps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24feat(operator): select operator overloads by the expected result type_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24feat(overload): select overloads by return type as well as parameters_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22feat(codegen): short-circuit AND and OR_ov4
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22feat(codegen)!: require explicit REAL to INTEGER conversion and add INT_ov4
Implicit REAL to INTEGER is now a compile error with an INT(...) hint. INT is a compiler builtin that truncates toward zero and raises a runtime error for NaN or values outside the INTEGER range. No existing test program relied on the implicit conversion. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22feat(codegen)!: reject implicit BOOLEAN, CHAR and INTEGER mixing_ov4
Arithmetic and unary minus accept only INTEGER and REAL, AND/OR/NOT need BOOLEAN, comparisons need equal types (or INTEGER with REAL), and only INTEGER converts implicitly to REAL. Use ASC and CHR for characters. No existing test program relied on the now-illegal mixing, so none changed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22feat(codegen): pass C-struct records by value as variadic arguments_ov4
A variadic EXTERN call is now arranged by clang per call, from the fixed parameter count and the promoted argument types. C-struct records pass unchanged in variadic positions, as C11 6.5.2.2p6-7 and 7.16.1.1p2 allow; a record that is not a C struct names the offending field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(codegen): share file keyword filename operand emission_ov4
EOF, OPENFILE, READFILE and CLOSEFILE each rejected a whole-array filename and then emitted it as a C string. Route them through a private emitFileNameOperand helper; diagnostics are unchanged. WRITEFILE keeps its own combined check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21feat(codegen): support explicit template arguments_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20refactor(strings): replace compiler builtins with the STRING library_ov4
Construct literals as STRING values and route string operations through ordinary library functions and operators. Preserve value ownership in records, arrays, constants and file I/O. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18feat(operators): add member and unary overloads with explicit calls_ov4
Select member and global candidates together, enforce private access, and reuse argument marshalling. Materialize temporary receivers for chaining and register them for the existing object cleanup mechanism. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18feat(operators): support global binary operator overloads_ov4
Resolve exact operand types and preserve declared operator return types. Reject implicit STRING to BOOLEAN conversion at typed expression boundaries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(codegen): declare and call EXTERN C functions_ov4
Variadic arguments must be C values and receive C default argument promotions; narrow integer parameters carry sign/zero extension. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(codegen): overload global functions and procedures_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(classes): allocate objects with NEW and rebind named class variables_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(classes): support ordinary member methods and this references_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-17feat(memory): add checked REALLOC with failure preservation_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-17feat(memory): add tracked MALLOC and FREE builtins_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-17feat(calls): support standalone calls and void pointer casts_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(compiler): correct CIE semantics and diagnostic locations_ov4
Use standard WHILE headers and default-public class fields, resolve pseudocode identifiers without case sensitivity, and check signed i64 literal boundaries before conversion. Preserve source locations across recursive emission and function diagnostics. Add 22 regression cases and update compiler examples and documentation. Validated all 69 CTest entries with the original Linux Actions seed and verified the release package's embedded, native and IR output paths.
2026-10-16feat(constants): implement literal constants with lexical scope_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16feat(control-flow): implement ordered CASE OF matching_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16refactor(codegen): split emission by responsibility_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>