aboutsummaryrefslogtreecommitdiff
path: root/tests
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-28feat(library): add contextual conversion return overloads_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28feat(overload): support default return types_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27feat(library)!: replace #LIB with __LIB source regions_ov4
Track library mode by original source line, including deferred template bodies and automatic object cleanup. Update call lines from ordinary code and migrate the embedded standard library to PP_DEFINE __LIB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27feat(preprocessor): add file-local conditional switches_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-23fix(stdlib)!: return CHAR from CHR_ov4
BREAKING CHANGE: CHR now returns CHAR instead of STRING, so user overloads and templates select or deduce CHAR for CHR(...). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22feat(input)!: validate INPUT and read whole lines into STRING_ov4
Scalar INPUT now reads one whitespace-delimited token through module-local IR helpers instead of scanf, then skips spaces and tabs and consumes one newline. INTEGER, REAL, BOOLEAN (TRUE or FALSE in any case) and CHAR are validated, and bad input or end of input is a runtime error. STRING INPUT reads the rest of the line. The unused scanf and REAL printf format globals are removed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22fix(parser): report missing THEN and ')' on the line that needs them_ov4
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22fix(codegen): name both operand types in invalid operator diagnostics_ov4
Updates the operator-global-errors and string-type-mismatch expectations to the new "Operator X cannot be applied to A and B" wording. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22fix(classes): defer NEW for DECLARE without a parameterless constructor_ov4
A plain DECLARE, field or array element now calls NEW only when the class has a parameterless one; otherwise the zeroed object waits for x <- NEW C(...), as in guide section 10.2. DECLARE with parentheses still requires a matching constructor. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22feat(output)!: print REAL values in shortest round-trip form_ov4
OUTPUT and NUM_TO_STR now share Python repr formatting instead of %f. BREAKING CHANGE: REAL output changes from six fixed decimals (2.500000) to the shortest round-trip text (2.5). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22fix(stdlib): make IS_NUM agree with STR_TO_NUM and explain conversion errors_ov4
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22feat(codegen): accept ^x of C values as variadic arguments_ov4
In a variadic EXTERN position, ^x now passes the address of x as a plain pointer when x has a C type or is a C struct, like C's f(n, &x). The address of a pseudocode-typed value keeps the "must be a C value" error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22feat(codegen): accept pointer types to any C type in EXTERN_ov4
A pseudocode pointer type now counts as a C type, in EXTERN signatures and as a C-struct field, when it finally points to a non-void C type or a C struct, as in TYPE PInt = ^C_INT. A pointer cycle such as TYPE P = ^P and a pointer to a pseudocode type stay rejected. Co-Authored-By: Claude Opus 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-22feat(codegen): return C-struct records by value_ov4
EXTERN_FUNCTION may now return a C-struct record by value, either through caller-supplied sret memory or as a coerced value stored back into the record, as clang arranges it. This removes the last by-value rejection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22feat(codegen): pass C-struct records by value_ov4
EXTERN parameters may now be C-struct records by value. clang's arrangement decides the passing: coerced through memory, flattened into elements, or indirect as byval or a pointer to a copy. Returning a record by value stays rejected for now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22feat(codegen): accept record pointers as variadic arguments_ov4
Pointer types to C-struct records now pass unchanged as variadic EXTERN arguments. Pseudocode values still need a cast to a C type, and records by value stay rejected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22feat(codegen): accept pointers to C-struct records in EXTERN signatures_ov4
A TYPE record whose fields are all C types, C structs or pointer types to C structs now crosses the EXTERN "C" boundary through a pointer type. Records by value are rejected for now, and a pointer to a record with a non-C field names that field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22test(extern): check variadic promotions with va_arg_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21feat(diagnostics): print source diagnostics in gcc file:line: layout_ov4
Lexer, parser, driver and codegen diagnostics now read "<path>:<line>: error: <message>" instead of "error: <message> at line N in <path>". The path is always printed as given on the command line. Call sites pass the bare message to cps::sourceError/sourceWarning, which carry printf format checking; reportError routes through the same helper. The suite iii harness parses the new layout and matches the reason against the message only. iii/template-class-pack-field passed only because its reason regex matched the case path, so it is now case-insensitive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21feat(codegen): instantiate class templates_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21feat(codegen): add variadic function templates_ov4
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-21feat(codegen): instantiate function templates by deduction_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21feat(parser): parse TEMPLATE declarations, template ids and parameter packs_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20test(strings): align error cases with the standard library_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20test(strings): update constructor type mismatch diagnostic_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20docs(strings): document the embedded standard library and STRING values_ov4
Describe -no-std, C_STRING literals, library function semantics and owning string lifetimes in the manuals and contributor guidance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20fix(strings): preserve enclosing class lifetimes during assignment_ov4
Copy owned string fields without reconstructing or destroying their containing class, and retain rvalue ownership transfers. 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-20feat(driver): embed and automatically link the standard library_ov4
Add -no-std to disable default library loading and linking. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20feat(lexer): add C_STRING literal suffix_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20feat(library): add experimental string IS_NUM function_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20feat(library): add experimental string CHR function_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20feat(library): add experimental string ASC overloads_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20feat(library): add experimental string UCASE overloads_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20feat(library): add experimental string LCASE overloads_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20feat(library): add experimental string MID function_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20feat(library): add experimental string RIGHT function_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20feat(library): add experimental string LEFT function_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20docs(readme): align feature and nightly release descriptions_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19fix(driver): bind MinGW JIT stdio locks to the host CRT_ov4
Resolve _lock_file and _unlock_file to the host compatibility functions so JIT stdio cannot pick incompatible locks from another CRT DLL. Cover fprintf inside a C++ catch with exact stderr expectations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18feat(lib): add experimental _EXP_STRING backed by std::string_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18feat(driver): load the embedded C++ runtime into the JIT_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18feat(operators): allow member assignment operator overloads_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>