aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-10-17refactor(runtime): write runtime diagnostics with fprintf(stderr)_ov4
Replace snprintf+write(2) with a single fprintf call on the platform's stderr: the C library's stderr / __stderrp, or __acrt_iob_func(2) on Windows, which the embedded runner binds to the host shim. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17docs: runtime diagnostics go to standard error_ov4
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17feat(runtime): write runtime diagnostics to stderr_ov4
Runtime check messages and the unhandled-exception message were printed to stdout by the generated program, so `cpsc x.cps -r >out.txt` captured them. They are now formatted with snprintf and written with write(2). Test expectations and docs are updated accordingly. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17test(harness): support optional expected-stderr.txt per case_ov4
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17test(multifile): cover imports, shared globals and exception propagation_ov4
Allow fixtures to pass ordered source lists and require file-qualified negative diagnostics. Add native and runner cases for cross-unit calls, global mutation and shadowing, transitive imports, types, MAIN status, exception catches, runtime failures and destructor unwinding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17docs: multi-file builds_ov4
Document INCLUDE visibility, primitive GLOBAL variables and MAIN entry rules, and highlight the new keywords in the editor grammar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(codegen): FUNCTION MAIN entry point_ov4
Invoke the internal entry function through the generated exception handler and truncate its INTEGER result to the process exit status. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(codegen): GLOBAL variables as LLVM globals_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(driver): compile multiple source files with INCLUDE visibility_ov4
Reject builds without an entry program and duplicate cross-file definitions. Preserve source order for each unit's own constants and import visible exports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(parser): parse INCLUDE and GLOBAL blocks_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17refactor(diag): file-qualified diagnostic locations_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17docs(classes): document destructors, DELETE and RAII_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(classes): destroy stack objects during exception unwinding_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(classes): destroy stack objects at scope exit_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(classes): destroy and release heap objects with DELETE_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(classes): parse DELETE destructor methods and DELETE statement_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17fix(classes): preserve method-only heap objects and document NEW_ov4
Allocate at least one byte for method-only classes so their heap addresses remain usable through pointers. Complete constructor diagnostics, field-order and exception coverage, document construction and rebinding, and highlight NEW. 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): construct declared objects and nested fields and arrays_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(classes): support explicit NEW constructor method calls_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17fix(parser): accept optional DO after WHILE condition_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17docs(classes): describe member methods and this semantics_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-17feat(classes): warn when method declarations shadow fields_ov4
Retain parameter source lines for warnings and preserve field access prefix validation when distinguishing fields from methods. Co-Authored-By: Claude Fable 5.1 <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-17docs(tests): remove obsolete failure history_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-17docs(input): document array and member targets_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-17feat(input): support array elements and member targets_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-17docs(tests): require a native perl on Windows CI_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-17fix(ci): run Windows tests with native Strawberry Perl_ov4
MSYS perl applies Unix path rules to the native D:/ drive paths that CMake passes for run.pl and its --perl, --case and --results arguments, failing abs_path and script lookups so 67 of 69 ctest cases errored. Point PERL_EXECUTABLE at the runner's preinstalled Strawberry Perl and fail the build step loudly when it is absent. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16docs(tests): drop Python from the test setup_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16test(harness): port harness self-tests to Perl_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16test(harness): port case runner to Perl_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16test(harness): port summarize to Perl_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16test(harness): port check_generators to Perl_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16docs(jit): describe the simplified ORC runtime integration_ov4
Drop removed mechanisms (custom SEH keep-alive, hand-written probe, IR personality forwarding) and document the factory, default liveness, stub, and probe binding now used. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16refactor(jit): consolidate embedded object layer setup_ov4
Move ObjectLinkingLayer creation, COFF flags, and SEH plugin install into one file-local factory used before LLJIT owns the layer. Drop the repeated dyn_cast checks from the main flow. Linux verified: build, normal and large-frame runs, exception cases. Windows layer/plugin behavior still needs CI verification. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16refactor(jit): use JITLink stubs for COFF personalities_ov4
Replace the IR personality forwarding layer with graph-local pointer jump stubs for the three GNU personality symbols in .xdata. Linux verified: build, nested THROW, cross-procedure unwind, CATCH with RETURN, uncaught exception. Windows execution still needs CI verification; the stub pass passed a local LLVM 23 syntax check only. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): bind the MinGW runtime stack probe directly_ov4
Drop the hand-written chkstk assembly and bind the toolchain-provided ___chkstk_ms on MinGW x86-64 instead. Other targets register no probe. Linux verified: build, normal run, large-frame run, exception cases. Windows/MinGW execution still needs CI verification. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16refactor(jit): remove redundant SEH preservation and validation_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16docs(pitfalls): mark embedded ORC execution verified on all CI platforms_ov4
Windows runner failures are fixed and nightly CI is green on Linux, Windows and macOS. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): scope the __ImageBase alias to its own graph_ov4
Module and platform graphs each need their own base for 32-bit image-relative unwind addresses. A graph-local alias keeps the shared name from colliding at materialization time. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): leave LLJIT platform graphs out of __ImageBase aliasing_ov4
Platform-support graphs carry __lljit.platform_support_instance and manage their own base; aliasing it there duplicates the symbol at materialization time and spoils the exit code. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): guard personality access with hasPersonalityFn_ov4
getPersonalityFn on a function without the personality operand reads out of bounds. The newly created stub hit this in the reroute scan. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): only alias __ImageBase when purely external_ov4
LLJIT platform-support graphs define their own __ImageBase; aliasing it again duplicates the symbol and corrupts materialization. Skip those. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): keep COFF unwind tables addressable from JIT memory_ov4
COFF unwind tables use 32-bit image-relative addresses. Alias the external __ImageBase to the lowest defined block once addresses are final, and route the personality through a JIT-local stub so both stay within range of the JIT tables. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): provide JIT-only stack probe without weak host reference_ov4
The weak ___chkstk_ms reference marked the host import weak on COFF and segfaulted the compiler itself. Provide a JIT-only probe under a unique name with the same page-touching behavior instead. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): resolve MinGW stack probe for embedded execution_ov4
Windows runner failed with missing ___chkstk_ms. Reference it weakly so platforms without it see null while MinGW exposes its host address. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>