Skip to content

Releases: upstat-io/ori-lang

Ori 2026.03.28.1-alpha (Nightly)

28 Mar 00:57

Choose a tag to compare

Pre-release

Ori v2026.03.28.1-alpha — Release Notes

This release advances struct representation optimization, bringing LLVM-level field narrowing to the codegen pipeline and fixing a class of cross-module metadata loss that caused narrowed types to silently revert to their original widths at module boundaries. Several memory safety issues in derive(Debug) codegen are also resolved.


Compiler

  • Struct field narrowing now generates correct LLVM code. The codegen backend now emits sext/trunc instructions when loading and storing narrowed struct fields, respecting the ABI boundary policy introduced alongside it. Overflow guards prevent silent truncation at call boundaries. This is the first end-to-end path for representation-optimized structs to survive through to native code.

  • Narrowed types no longer lose their metadata across module boundaries. In multi-file AOT compilation, repr/pub type metadata was silently dropped when types crossed module boundaries — causing narrowed fields to fall back to their full-width representation in downstream modules. ExportedTypeMetadata is now correctly threaded through the entire multi-file pipeline, including transitive re-exports.

  • Local variable narrowing infrastructure is in place. The compiler now tracks narrowed local variables through straight-line code, laying the groundwork for full narrowing propagation in a future release. Currently covers variable declarations and assignments; control-flow merging is upcoming.


Bug Fixes

  • Fixed a memory leak in derive(Debug) for string fields. The derived Debug implementation was not releasing string field temporaries, causing a leak on every debug-print of a struct containing a str field.

  • Fixed incorrect output from derive(Debug) for negative integer values. Derived formatters were mishandling the sign bit for certain negative integers, producing wrong output. Semantic pin tests now cover this case as a permanent regression guard.

  • Fixed an index mismatch in integer narrowing IR. An off-by-one in the narrowing pass was selecting the wrong field index when emitting narrowed loads, silently producing stale values. IR-level semantic pins have been added to catch any regression.


Tooling

  • Fixed install.sh library directory detection. The LIB_DIR derivation logic was broken on some Linux configurations, causing installs to place the runtime library in the wrong path. The script now correctly derives the target library directory.

What's Next

  • Straight-line local narrowing — the compiler will propagate narrowed types through sequential statements, completing the Phase B narrowing pass and enabling more structs to benefit from smaller in-memory representations without any source changes.
  • Control-flow narrowing — extending narrowing across if/match branches, requiring a meet operation at join points to determine the widest needed representation on each path.
  • Expanded derive coverage — the derive(Debug) fixes exposed gaps in codegen for derived trait implementations; auditing and hardening the remaining derive-generated code paths is the immediate follow-on.

Ori 2026.03.27.5-alpha (Nightly)

27 Mar 03:46

Choose a tag to compare

Pre-release

Ori v2026.03.27.5-alpha

This release tightens the correctness of ABI-sensitive generic struct layouts. If you use #repr or expose public generic structs across FFI boundaries, monomorphized instances now faithfully preserve their parent type's layout guarantees.


Bug Fixes

  • Fixed silent layout narrowing for monomorphized generic structs — When a generic struct carrying #repr attributes or marked as a public ABI type was instantiated with concrete type arguments, the resulting monomorphized layout silently dropped those annotations. This could produce incorrect FFI struct layouts or unexpected ABI behavior at call boundaries. The representation optimizer now scans for these instantiated types and propagates #repr metadata and public ABI exemptions from the parent named type through to every concrete realization. Two semantic pin tests verify the fix holds under regression.

What's Next

  • Representation optimization hardening — With ABI metadata propagation now correct for generic types, the next focus is validating the full repr-opt pipeline end-to-end across complex generic hierarchies and nested type aliases.
  • Stabilizing the alpha test suite — The 3,956 LCFail count remains the primary quality signal being driven down; expect targeted fixes to the lowering and codegen layers that contribute most of those failures.
  • Standard library expansion — Ongoing work on collections and iterator primitives to bring the stdlib closer to feature-complete for everyday Ori programs.

Ori 2026.03.27.3-alpha (Nightly)

27 Mar 02:25

Choose a tag to compare

Pre-release

This is a small patch release — two targeted fixes land alongside a tightening of the integer narrowing rules introduced in recent representation optimization work.

Compiler

  • Improved integer narrowing for C-aligned typesCAligned integer types now correctly skip the narrowing pass. Previously, narrowing could produce invalid representations for types whose alignment is dictated by the C ABI. Additionally, pub struct fields are now gated from narrowing by default, preventing silent ABI-visible layout changes from crossing crate boundaries.

Bug Fixes

  • Fixed release notes publishing a UUID instead of content — The automated release notes pipeline was emitting a bare request UUID after an upstream SDK update changed the API (send()send_and_wait()). Release notes for v2026.03.27.3-alpha are the first batch generated correctly.

What's Next

  • Struct lowering completeness — Narrowing and representation optimization for aggregate struct types is the next area of focus, covering cases where field reordering and padding elimination interact with user-defined layouts.
  • Codegen pipeline consolidation — The lowering-to-codegen handoff has identified some structural bloat in the pipeline that will be addressed to keep compile times lean as the optimizer grows.
  • Continued representation optimization — The ongoing repr-opt work continues toward full coverage of scalar, aggregate, and C-interop types.

Ori 2026.03.27.1-alpha (Nightly)

27 Mar 01:08

Choose a tag to compare

Pre-release

This release delivers the complete value range analysis framework and begins integer narrowing — the compiler can now prove that struct fields hold bounded values and store them in narrower types.

Compiler

  • Value range analysis — New abstract interpretation engine computes provable integer ranges for every int-typed expression in a function. Includes an interval lattice with full arithmetic/bitwise transfer functions, conditional branch refinement (narrowing variables inside if x > 0 branches), fixpoint iteration for loops, and field-level summaries for struct members. Handles mutually recursive functions via SCC-based interprocedural propagation with configurable iteration budgets.
  • Interprocedural range propagation — Ranges now flow across function boundaries: callee return ranges narrow caller variables, and caller argument ranges seed callee parameters. Multi-hop chains (A calls B calls C) converge via iterated feedback. Handles both direct calls and unwind-capable invocations.
  • Integer narrowing for struct and tuple fields — When range analysis proves a field holds values in a bounded range (e.g., 0–255), the representation optimizer now selects the narrowest integer type (i8, i16, i32) for that field in LLVM codegen. This is the first concrete optimization produced by the representation pipeline.

Bug Fixes

  • Range arithmetic overflow — Fixed panics in range_div and range_bitnot transfer functions when operating on boundary values near i64::MIN/i64::MAX.
  • Stale field summaries after recomputation — Field-level range summaries weren't being refreshed after fixpoint recomputation, causing downstream functions to use stale ranges.

What's Next

  • Integer narrowing for enum payloads and newtype wrappers
  • Visibility gating — only narrow fields that aren't exposed through public API
  • Zero-sized type elimination in codegen

Ori 2026.03.26.1-alpha (Nightly)

26 Mar 01:21

Choose a tag to compare

Pre-release

This release completes ARC triviality analysis and delivers a comprehensive conditional compilation overhaul, bringing #target and #cfg support to all item types.

Compiler

  • ARC triviality analysis — The compiler now classifies every type as ARC-trivial (no reference counting needed) or ARC-nontrivial, enabling the ARC pipeline to skip unnecessary rc_inc/rc_dec calls for value types, primitives, and structs composed entirely of trivial fields. Includes transitive analysis (a struct of trivials is trivial) and alignment across all iterator adapter paths.
  • Conditional compilation on all item types#target and #cfg attributes now work on functions, types, traits, impls, constants, imports, and extensions. Previously these only worked on functions and types. Includes proper validation of feature names and attribute structure, correct handling of orphan attributes at end-of-file, and no leakage during incremental parsing.

Bug Fixes

  • Error type canonicalization — Error sentinel type indices weren't being canonicalized during triviality analysis, which could cause compiler panics or incorrect results when encountering type errors in upstream code.

What's Next

  • Integer range analysis — proving fields hold bounded values (e.g., 0–255) to enable narrower storage types
  • Representation optimization pipeline end-to-end through LLVM codegen

Ori 2026.03.25.3-alpha (Nightly)

25 Mar 09:23

Choose a tag to compare

Pre-release

This release adds equivalence verification for representation optimization and hardens the build option pipeline.

Compiler

  • Representation optimization equivalence testing — Added end-to-end verification that compiles programs with and without representation optimization, comparing output, exit codes, and RC balance to ensure optimizations are semantically transparent. Environment pinning ensures reproducible results across CI and local runs.
  • Build option pipeline hardened — CLI flags now properly override environment variables (previously ORI_NO_REPR_OPT could silently clobber explicit --repr-opt flags). Invalid #repr attributes on newtypes are now rejected with clear diagnostics instead of being silently accepted. Flag precedence tracking is deterministic and debuggable.

Bug Fixes

  • Panic in type canonicalization — Replaced unwrap() calls in the type canonicalization path with fallible returns, preventing compiler panics on partially-resolved generic types during incremental compilation.

What's Next

  • ARC triviality analysis — classifying types that don't need reference counting
  • Conditional compilation attribute coverage for all item types

Ori 2026.03.25.1-alpha (Nightly)

25 Mar 00:58

Choose a tag to compare

Pre-release

This release delivers the core representation optimization pipeline — Ori's compiler now analyzes struct layouts, detects cycles, computes zero-sized types, and routes optimized type information through to LLVM codegen.

Compiler

  • Representation optimization pipeline — New ori_repr crate analyzes per-type representation decisions (narrowed integers, ZST elimination, layout reordering) and records them with provenance for debugging. Integrated between type checking and codegen with a --no-repr-opt flag for disabling. Handles mutually recursive types via shared memoization and cycle detection.
  • #repr attribute end-to-end — The #repr("c"), #repr("packed"), and #repr("transparent") attributes are now parsed, validated, type-checked, and propagated to LLVM codegen, enabling user-controlled memory layout.
  • Optimized LLVM type generation — LLVM type generation now consults the representation plan to emit narrower types (e.g., i8 instead of i64 for fields proven to hold small values).
  • NarrowingPolicy configuration — Replaced the boolean --no-repr-opt with a policy enum enabling fine-grained control over which optimizations are applied. Integrated with Salsa for incremental recomputation.

Bug Fixes

  • ORI_NO_REPR_OPT ignored in zero-arg AOT path — The environment variable was silently ignored when the AOT compiler was invoked without explicit CLI arguments.

What's Next

  • Representation optimization equivalence verification
  • Build option pipeline hardening
  • Comprehensive representation test matrix

Ori 2026.03.24.1-alpha (Nightly)

24 Mar 00:51

Choose a tag to compare

Pre-release

This release scaffolds the representation optimization crate and resolves macOS AOT codegen issues blocking cross-platform correctness.

Compiler

  • Representation optimization crate scaffolded — New ori_repr compiler crate with initial module structure, public API, and integration points with the ARC pipeline. This is the foundation for integer narrowing, layout optimization, and ARC elision.
  • Ori vs Rust performance benchmarks — Added head-to-head benchmarks comparing Ori AOT output against equivalent Rust programs, with an analysis plan to guide optimization priorities.

Bug Fixes

  • macOS struct field projection — Fixed incorrect GEP offsets for multi-field struct projections on macOS, causing silent data corruption when accessing struct fields in AOT-compiled code.
  • macOS struct return ABI — Fixed struct-return ABI mismatch on macOS where large return values weren't properly passed via sret pointer.

What's Next

  • Representation optimization pipeline implementation (cycle detection, ZST analysis, layout optimization)
  • #repr attribute wiring through the compiler pipeline

Ori 2026.03.23.3-alpha (Nightly)

23 Mar 14:21

Choose a tag to compare

Pre-release

The largest release in Ori's history introduces AIMS (ARC Intelligent Memory System) — a ground-up rewrite of the ARC memory management pipeline delivering 81 correctness fixes, a fully audited LLVM backend, and cross-platform unwind support.

Language

  • Argument and variant pattern punningCircle(radius:) now matches Circle(radius: radius), matching the existing call-site punning syntax. Works for all variant and struct patterns.

Compiler

  • AIMS — unified ARC memory management — Replaced the ad-hoc ARC pipeline with a principled 5-dimension analysis framework (Ownership, Escape, Shape, Effect, Lifetime). A unified two-phase architecture — annotate IR with memory decisions, then emit concrete RC operations — replaces scattered emission logic. Includes interprocedural demand propagation for static COW elimination, FIP/FBIP contract classification for proving allocation reuse, and TRMC (Tail-Modulo-Cons) rewrites for cons-cell-producing recursion.
  • LLVM IR quality audit — Added nonnull, dereferenceable, readonly, nounwind, memory(read), and purity annotations across all generated functions. Dead aggregate loads eliminated, borrowed pointers forwarded directly, and struct-return pointers forwarded through call chains. All 13 code journeys score 10.0/10 in IR quality.
  • V5 RC header — Redesigned the runtime reference count header to 32 bytes with element-count and element-destructor fields, enabling full element-level cleanup for slices and collections without codegen cooperation.
  • For-yield break/continue in AOTbreak and continue inside for...yield expressions now lower correctly to LLVM, enabling all control flow patterns in list comprehensions.
  • AOT leak detection — Compiled Ori programs now report RC leaks when ORI_CHECK_LEAKS=1 is set, integrated directly into the AOT main wrapper.

Bug Fixes

  • Windows panic unwind — Fixed a critical bug where LLVM cleanup blocks were silently skipped during panic unwinding on Windows MSVC. The runtime was using Win32 RaiseException, but LLVM cleanup blocks require C++ exception handling. RC-managed memory is now properly released during unwind.
  • 81 reference count correctness fixes — Resolved all known RC leaks, double-frees, and use-after-frees in AOT codegen. Major categories: fat pointer double-frees in struct projections and closure environments, slice COW propagation through string and list operations, alias closure failures at CFG merge points causing use-after-free, and missing element-level cleanup in collections.
  • ARM64 struct return ABI — Fixed iterator trampoline functions generating incorrect sret calling convention on Apple Silicon, causing silent data corruption in iterator chains.
  • String concat capacity blowup — Capped capacity growth to prevent exponential memory allocation when building strings in loops.
  • Recursive enum memory leak — Ensured element destructors traverse the full recursive structure for types like linked lists.
  • Set iteration corruption — Fixed Set iteration reading from wrong memory offsets in the hash table layout.

What's Next

  • Representation optimization pipeline — analyzing struct layouts for integer narrowing and ARC elision
  • macOS AOT hardening
  • Cross-platform equivalence verification

Ori 2026.03.23.1-alpha (Nightly)

23 Mar 01:00

Choose a tag to compare

Pre-release

Other

  • chore: release v2026.03.23.1-alpha (15e1979)
  • docs(proposal): approve extended iterator methods proposal (46873fe)