Releases
Prism release history. All releases are available on GitHub Releases.
v1.0.2 current
Prism 1.0.2 is here, no new features where added, this release is heavily focused on quality, performance, and robustness to ensure it's dependable for all.
Performance
Prism's transpiler throughput improved by 13.4% (measured by retired instructions on self-transpile). Six hot paths were optimized with bloom filters, O(1) post-annotation typedef rejection, consolidated token metadata access, and a pure-C early exit for files with no orelse usage. (4650fc8)
Algorithmic Improvements
- Noreturn function tagging reduced from O(N·K) to O(N+K) via single-pass token annotation (46bb2a5)
- Typeof func-proto scanning reduced from O(N²) to O(N) per declarator (12ff66f)
- Nested bracket orelse scanning reduced from O(N²) to O(N) via iterative stack (6bb82d1)
- Noreturn taint propagation reduced from O(D×T) to O(T+D×E) edge-based fixed-point (2b422a8)
Bug Fixes
defer: orelse fallback block bypassed defer cleanup at scope exit (46bb2a5, fc098bb)defer: stmt-exprgoto/returninside orelse bypassed defer cleanup (6bb82d1)defer: scope/block depth confusion over-unwound defers across goto boundaries (4e79cd5)defer: stmt-expr goto bypassed defer cleanup in bare orelse comma expressions (4e79cd5)defer: braceless control-flow in defer/orelse bodies broke brace injection (fc098bb)orelse: raw string literalR"(...)"inside#if 0desynchronized block-comment state (46bb2a5)orelse:__attribute__bracket orelse queue desynchronization (5942783)orelse: keyword leak viastatic rawverbatim bypass (19032bc)orelse:init-castVLA orelse crash on variably-modified types (12ff66f)orelse: bare comma split escaped braceless control flow (4e79cd5)orelse: preprocessor conditional mangling in bracket orelse rejected in Phase 1D (2b422a8)orelse: paren comma corruption in chained expressions (fc098bb)orelse/defer: shadowed keywords suppressed by variable, enum, or typedef names (3f6e7c3)orelse/defer: braceless control-flow body wrapping conflicts with orelse handler (fc098bb)- MSVC test compatibility fixes (fc098bb)
- Recursion regression in deeply nested braceless
ifchains (2ec6a01)
Stats
- 23 bugs fixed, 6 performance optimizations
- +21 new test functions, total: 4,020 tests passing
- +1,246 lines of new test coverage
- 9 files changed, +2,502 insertions, -1,040 deletions
v1.0.1
Prism is out of its 1.0 stabilization phase, Prism is shifting to a more frequent release cadence.
This release also marks a fundamental shift in the nature of the project. Prism is no longer just a transpiler that adds explicit features like defer and orelse-it is evolving into a progressive enhancement engine for standard C. Developers get safer, faster, and tighter binaries simply by passing their code through the transpiler, without changing a single line of their source.
Progressive Enhancement: Auto-Unreachable Insertion
Prism now automatically tracks _Noreturn, [[noreturn]], and standard library exit functions across your entire translation unit. It now silently injects __builtin_unreachable() (or __assume(0) on MSVC) after these calls. (b3a6981)
Performance & Binary Size
By feeding explicit control-flow termination data directly to the backend C compiler, this enables aggressive dead-code elimination (DCE), allows the backend to drop unnecessary function epilogues, reduces register pressure, and improves branch prediction. Your binaries get smaller and faster automatically.
Bug Fixes
defer: cross-branch goto dropped cleanups - LCA exit gated behind flawed depth comparison (c3b824a)defer: braceless for-bodyif/elseprematurely cleared shadow scope (8017af3)defer: noreturn member namespace pollution injected false__builtin_unreachable()(6a0140e)zeroinit: typeof func-type scanner ignored paren depth in_Static_assert(sizeof(...))(c180878)zeroinit: CFG verifier missed braceless-scope declarations in switch (3da543b)orelse: static/extern persistence corruption - runtime re-init destroyed static semantics (05c61e2)orelse:typeof(RHS)double-evaluated VM-type expressions in bare assignment (10cf638)orelse: preprocessor directive in fallback concatenatedifbranches (887766d)
Stats
- 8 bugs fixed, 1 feature added
- +26 new test functions, total: 3,902 tests passing
- +758 lines of new test coverage
- 10 files changed, +935 insertions, -240 deletions
v1.0.0
This release represents a complete architectural rewrite of the transpiler from the ground up, graduating Prism from a single-pass prototype into a hardened, production-ready tool. Introduced the new orelse keyword, added full native Windows (MSVC) support, and massively expanded the test suite.
Most importantly, Prism is now fully self-hosting and fundamentally safer by design.
Major Highlights
- New Language Feature: The
orelsekeyword for elegant fallback values and control flow. - Native Windows Support: Full compatibility with MSVC (
cl.exe). - Two-Pass Architecture: A complete rewrite of the internal transpilation pipeline for much improved robustness.
- Robustness Hardening: Eliminated entire categories of parsing edge-case bugs.
- Massive Test Expansion: Over 2,700 new tests added.
- Formal Specifications: Technical
SPEC.md&DRAFT_SPEC.mddocumentation.
The Paradigm Shift: Two-Pass Architecture
Before, Prism used a single-pass architecture - it walked the token stream once, building the typedef table on the fly and emitting C as it went. Typedefs were popped from a mutable table on scope exit. Labels were scanned per-function right before emission. Goto safety was checked inline during code generation. It worked, but every edge case was a new special case bolted onto the emitter, and the emitter was already doing too much.
Now there are two distinct passes:
- Pass 1 walks every token at every depth before a single byte is emitted. It builds an immutable symbol table of every typedef, enum constant, parameter shadow, and VLA tag. It constructs a full scope tree - every
{/}pair with parent links and classification (loop, switch, function body, statement expression). It collects every label, goto, defer, case, and declaration into per-function entry arrays. Then a CFG verifier checks every goto-label and switch-case pair against defers and declarations. If your code is unsafe, Prism errors before writing a single byte. - Pass 2 is purely mechanical - it reads the immutable tables from Pass 1 and emits C. No typedef mutations, no scope tracking, no error decisions. Just output.
This separation closed entire categories of bugs. The old architecture had ~20 different places where the emitter had to make semantic decisions mid-output. Now it just reads annotations.
Architecture Comparison
- Execution: Single-pass emitter → two-pass (7 analysis phases + CFG verification + emission)
- Symbol Table: Mutable typedef table with scope-depth popping → immutable symbol table with token-position-based range lookups
- Label Scanning: Per-function label scan at emit time → all labels/gotos/defers collected in Pass 1, verified in Phase 2A
- Goto Safety: Inline goto safety checks during emission → O(N) snapshot-and-sweep CFG verifier with hash-based label lookup
- Scope Tracking: Ad-hoc scope tracking → full scope tree with parent links, classification, and ancestor queries
Scale & Stability By the Numbers
- The Codebase: 13,132 insertions and 7,287 deletions across 287 commits. The core transpiler grew from 5,839 to 13,494 lines of C (
prism.c+parse.c+windows.c) to accommodate the deep semantic analysis phases. - The Test Suite: Expanded from ~1,000 to 3,795 tests across 9 suites (adding over 37,916 new lines of test code).
- CI/CD Pipeline: Now continuously tested across 6 diverse platforms: Linux x86_64, macOS x86_64, macOS ARM64, Windows build-only, Linux ARM64, Linux RISC-V64.
- Self-Hosting: Prism transpiles itself, the output compiles, that binary transpiles Prism again, and the two outputs match byte-for-byte.
Documentation & Specs
- SPEC.md - 785-line transpiler specification. Every item corresponds 1:1 to implemented behavior exercised by the test suite. This is not aspirational - it describes what the transpiler does.
- DRAFT_SPEC.md - Ideas under consideration. Nothing here is implemented. Items may be adopted, modified, or rejected. Once implemented, they move to
SPEC.md.