aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-10-22fix(codegen): raise a runtime error when a FUNCTION ends without RETURN_ov4
Report the function and its header line, then throw, instead of silently returning zero. FUNCTION MAIN keeps its implicit result. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22fix(arrays): free array buffers when their scope ends_ov4
Register every array as a stack object so its buffer is freed on scope end, re-DECLARE, RETURN and unwinding; run the element-destroy loop only for types that need destruction. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22fix(arrays): reject inverted bounds and check array allocation_ov4
Constant inverted bounds are a compile error and other bounds are checked at run time. Allocation sizes use overflow-checked arithmetic, and a NULL malloc (including the BYVAL copy) reports that the array is too large. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22fix(codegen): skip IR verification after reported errors_ov4
Verify the module only when no error was reported, and let defineRecord skip bad fields and still set the record body, marking it Invalid so later missing-field lookups stay silent. 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(driver): cache the embedded standard library per user_ov4
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-22fix(plugin): escape typographic single quotes for PowerShell_ov4
PowerShell treats U+2018 to U+201B as single quotes too, so a path containing one ended the quoted string early. Double them like '. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22docs: document C-struct records for EXTERN_ov4
Describe which TYPE records count as C structs, passing them by value and by pointer as parameters, RETURNS and variadic arguments, and the recursive pointer types EXTERN accepts. Note the clangCodeGen dependency and the CABI sources in the architecture notes. Co-Authored-By: Claude Opus 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): arrange EXTERN signatures with clang's C ABI_ov4
Every EXTERN "C" signature is now arranged by clang's CodeGen (arrangeFreeFunctionCall) for the host triple and applied by one generic lowering routine, replacing the hand-written signext/zeroext rule. clangCodeGen is linked statically into CPSCodeGen. Records still cross only through pointer types, so generated code is unchanged. 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-22fix(build): pass cmd.exe a native path in the Windows install_ov4
find_program returns C:/Windows/System32/cmd.exe, and cmd scans its whole command line for switches, so it read "/cmd.exe" as /c and ran "md.exe /d ..." instead of install.cmd, failing with "The syntax of the command is incorrect." Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22build(bundle): port the package smoke test to Perl_ov4
Replace bundle/scripts/smoke-package.py with smoke-package.pl, which uses only core modules like the other build and test scripts. Windows runs it with native Strawberry Perl. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22docs: document the cmd installer_ov4
Describe install.cmd in place of install.ps1: how to run it from the ZIP or a build tree, its options and limits, the PowerShell-only shortcut, the user PATH update and what CI verifies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22ci(nightly): run the package installers in smoke tests_ov4
The smoke tests only checked that each package contained its installer. Linux and macOS now run install.sh into a temporary prefix. Windows runs install.cmd twice into a prefix with spaces, checks the shortcut and the user PATH (no duplicate entry), and runs cmake --install on the build tree. Each platform then runs the installed compiler. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22build: package and invoke install.cmd instead of install.ps1_ov4
The Windows ZIP now ships install.cmd, rewritten to CRLF by configure_file so the package is right on any build host. The CMake install target runs it through "cmd /d /c call", and install.cmd replaces install.ps1 in the version input paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22feat: add a cmd installer for Windows_ov4
Many Windows machines block PowerShell scripts, but cmd is practically always available. install.cmd copies the package into a per-user prefix and adds it to the user PATH with reg; only the Start Menu shortcut uses a single powershell -Command call, and a failure there just warns. .gitattributes keeps *.cmd in CRLF because cmd misreads LF batch files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22build: count .github changes in every product version_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22build(bundle): version Bundle packages by their last source commit_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22docs: describe latest nightly asset names and per-product versions_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22feat(bundle): report newer nightly builds on startup_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22build(release): version compiler packages by their last source commit_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22ci(nightly): publish latest-named assets and version.json_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22build(plugin): version the VSIX by the last plugin commit_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22ci(nightly): fetch full history for per-product versions_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22update readme_ov4
2026-10-22refactor(parser): move TEMPLATE declaration and argument parsing into ↵_ov4
ParserTemplate.cc Pure move of isTemplatePack, ParseTemplateDecl and ParseTemplateArgs out of ParserType.cc; no behavior change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22refactor(codegen): move call marshalling and resolution into CallGen.cc_ov4
Pure move of both marshalCallArgs overloads, emitVariadicArgument and resolveCall out of CodeGen.cc; no behavior change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22refactor(parser): share the FUNCTION and PROCEDURE body tail_ov4
ParseFunctionBody() scopes the prototype's pack parameters, parses the body up to ENDFUNCTION/ENDPROCEDURE, reports the same "expected ..." diagnostic and builds the FunctionDefAST for both declaration forms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(parser): share call-argument, result-access and type-token checks_ov4
Add ParseOptionalCallArgs() for member calls and NEW, diagnoseResultAccess() for the duplicated "access on a function result" diagnostic, and isBuiltinTypeToken() for the builtin type keyword list used by template-call lookahead, cast detection and CASE label scanning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(parser): share the designator degrade rule for INPUT and expressions_ov4
INPUT targets and identifier expressions now build their legacy VariableExprAST/ArrayAccessExprAST/DesignatorExprAST node through makeDesignator(). INPUT still sets the target line explicitly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(parser): extract INCLUDE/GLOBAL, DELETE, INPUT and OUTPUT parsing_ov4
Move the self-contained arms of ParseStatementImpl into ParseIncludeOrGlobal, ParseDeleteStmt, ParseInputStmt and ParseOutputStmt without changing their bodies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(parser): share callee-name parsing and make operator out-param optional_ov4
ParseOperatorName() takes an optional int * so callers that ignore the operator token no longer declare a dummy. The identical identifier-or- OPERATOR prologues of assignment, identifier-expression and CALL parsing move into ParseCalleeName(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(parser): remove dead token return, precedence check and includes_ov4
getNextToken() now returns void since no caller reads its result, and GetTokPrecedence() does a single map lookup without the unreachable non-positive precedence check. Unused <cstdio>, <set> and FunctionAST.h includes are dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(driver): move PATH-mode lli runner into PathRunner_ov4
PathRunner.cc holds the lli lookup, LLVM 23 version check and lli execution, and is built only with CPSC_RUN_MODE=PATH like EmbeddedRunner.cc is for EMBEDDED. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(driver): split main into argument, unit, object and output steps_ov4
Move the stages of main() into file-local functions without changing diagnostics, exit codes or output files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(driver): report embedded runner failures through one helper_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(driver): load native link resources through one helper struct_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(driver): share INCLUDE and INCLUDE_OBJ path resolution_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(driver): drop redundant continue for color options_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(codegen): share the READ-mode check of file read and EOF helpers_ov4
__cps_file_read and __cps_file_eof both emitted the same mode load, comparison and ErrNotRead check after the slot lookup; emit it through FileHandler::emitRequireReadMode instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(codegen): make importCType private and reuse registerType's entry_ov4
importCType is only called from TypeSystem's own methods. declareUserType now sets IsClass through the entry registerType returns instead of looking the name up again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22refactor(codegen): spell user-kind operator diagnostics with operatorSpelling_ov4
TypeCheckGen's private opToText duplicated cps::operatorSpelling; both produce the same text for every binary operator the parser accepts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>