Blaise v0.15.02026-10-23
Blaise v0.15.0 — Changelog
Changes since v0.14.0 (579 commits, 2026-08-06 to 2026-10-23).
Platforms
- macOS arm64 is a shipped target, and from this release the primary development host. The compiler self-hosts on Apple Silicon with every fixpoint byte-identical.
- The arm64 backend reaches parity with x86-64: closures and captures, method pointers, interfaces and itab dispatch, jumbo sets, threadvars of every type, static arrays by value, record methods, generic records, properties of every kind, and the --debug ARC leak tracker.
- Calls to C routines follow AAPCS64 on arm64 and the System V classes on x86-64, including records passed by value.
- Fibers run on arm64 through a CPU-neutral context unit, and the async runtime uses the kqueue reactor on macOS.
- The Linux x86-64 release binary is now freestanding and statically linked (no glibc dependency). It is cross-built on macOS and proven byte-identical to its own Linux self-build. Releases up to v0.14.0 shipped a cc-linked dynamic binary built on Linux.
Toolchain
- The QBE backend is removed. The native backend is the only backend; --backend stays for an external LLVM backend.
- The internal Mach-O linker binds C libraries beyond libSystem (external 'z', external 'ssl'): one LCLOADDYLIB per library, imports bound to the library that exports them, read from the dylib's export trie or the SDK's .tbd stub. Previously such programs linked and then aborted at launch.
- libSystem imports are checked against the SDK's real export list. An import nothing exports is a link error naming the symbol, as with ld; real functions such as kqueue no longer draw a false warning.
- The internal ad-hoc signer writes entitlements.
- The RTL object cache is keyed by the content of its sources, and a cached unit object built for another target is rebuilt.
- The driver hard-errors when the compiler references a symbol it never defined.
- Unit files are found case-insensitively, and the program's own directory is searched.
- Editing a generic's body rebuilds the units that instantiate it.
- blaise.cfg unit paths are searched after --unit-path.
- The internal x86-64 assembler gains rdrand, rdseed, rdtsc, rdtscp and the carry-flag spellings; both assemblers accept .2byte/.4byte/.8byte.
Language
- Width-stating type names: Int and UInt (pointer-sized), Int32, UInt8, Float (always Float64) and the new 8-bit signed Int8. The ClassicPascalTypes unit keeps the FPC/Delphi names for ported code.
- IFoo(X) is a conversion checked at compile time; a failed as raises a catchable EInvalidCast.
- Method pointers and @Routine convert to reference to wherever one is expected; @Method works inside a method body.
- Properties in records.
- Write/WriteLn field widths: X:W and X:W:D.
- Initialised threadvars, and managed threadvars are released when their thread exits.
- Set initialisers and = nil initialisers on global variables; nil is a dynamic-array value.
- for-in over record and interface enumerators, and over an open-array parameter (GH #233).
- Inline procedural types in any type position (GH #222).
- Nested type sections in class and record bodies.
- A generic interface may inherit from a generic interface.
- A routine shadows a same-named routine of a used unit, and two units may export the same routine; Unit.Name(...) still reaches each one.
- Round, Trunc, Ceil and Floor return Int64; Round rounds half to even, as Delphi and FPC do.
- Move(Source, Dest, Count) and FillByte(Dest, Count, Value) intrinsics.
- @S[N] is the address of one byte of a string.
- A constant stored into a subrange or enum is range-checked; 8- and 16-bit integer types are valid array index types.
- Default arguments apply on every method call form.
- A constructor is what is declared constructor, not any routine named Create*.
- A record comparison uses its declared operator, or is an error.
- Constructs Blaise omits (with, goto, and other FPC/Delphi forms) are recognised and explained rather than reported as parse errors.
ARC and runtime
- A constructor call returns an owned reference.
- Dynamic arrays own their managed elements.
- [Weak] and [Unretained] locals, fields and captures take no reference on both backends.
- Instances built through a metaclass no longer leak.
- Write/WriteLn of a PChar stops at its NUL.
- A child process killed by a signal reports 128 + the signal number.
Codegen
- A for loop ending at its counter type's limit terminates on every integer type (GH #237).
- Float comparisons with a NaN follow IEEE 754.
- Same-named globals of two units get distinct storage.
- Dozens of receiver, transient-release and aggregate-result fixes across both backends, found by running the full suite on arm64.
Interfaces and the unit cache
- Array constants, nested types, subranges, enum-member subranges and constant-expression array bounds survive the .bif round trip.
- Qualified calls keep their unit through the cache (BLAISE-IFACE 27).
Standard library
- THttpServer.StartAny binds all interfaces.
- Non-blocking sockets, getentropy-based random bytes, large HTTP bodies and closed-peer writes all work on macOS.
- TStringList.Sorted := True sorts the entries already present.
- Double and Single keys for the hashed containers.
- TryGetValue clears the value on a miss.
- blaise.testing: AssertEquals for floats within a tolerance; the runner answers --help.
Debugging
- OPDF emits nested types, and its header names the real target architecture.
- pdr cannot yet debug macOS arm64 programs; the plan is in docs/future-improvements.adoc (v0.16).
Tooling and CI
- BlaiseGuard: BL-2006 ClassicTypeNames reports classic type names with their replacements (on by default for users); a config file layers over the built-in defaults; BL-1004 is enabled for the Blaise project, whose last 76 unused locals are gone.
- bindgen emits the width-stating type names, and skips a C typedef named like a Blaise builtin.
- kanban supports the macOS terminal.
- flag-coverage runs in the test suite.
- CI runs a macos-check job alongside the Linux bootstrap and the FreeBSD cross-check.
Release artefacts
| Tarball | Built | Verified |
|---|---|---|
| blaise-v0.15.0-macos-arm64.tar.gz | native stage-2 on macOS | every fixpoint and the full suites on macOS |
| blaise-v0.15.0-linux-x86_64.tar.gz | cross-compiled on macOS | byte-identical to its own Linux self-build, and the full suites on Linux x86-64 |
| blaise-v0.15.0-freebsd-x86_64.tar.gz | cross-compiled on macOS | ELF shape and version string; the master CI freebsd-crosscheck job runs the self-host fixpoint and full suite on FreeBSD |
Each tarball is self-contained: the binary, blaise.cfg, the RTL and stdlib source, and a hello.pas.
Fixpoint: 1,054,171 lines of stage-2 arm64 assembly. Tests: 5,161 compiler tests and 389 stdlib tests.
Blaise v0.14.02026-08-06
Blaise v0.14.0 — Changelog
Range: v0.13.0..v0.14.0 (415 commits). Fixpoint verified on 637,968 lines
of QBE IR; all four self-hosting fixpoints green (QBE, native,
internal-assembler, warm-cache). Full test suite: 4,977 tests passing,
2 ignored.
macOS ARM64 backend (new this cycle)
A complete native ARM64/macOS backend was built from scratch this cycle —
still in progress, but already self-hosting a growing slice of the
compiler's own source and running on real Apple Silicon hardware.
- Native AArch64 code generator implementing the AAPCS64 calling convention
for records, classes, interfaces, exceptions, and TLV thread-locals.
- Mach-O MHOBJECT and MHEXECUTE writers behind the IContainerWriter
seam, including LC_UUID, dyld load commands, and ad-hoc code signing.
- A standalone internal AArch64 assembler emitting Mach-O objects directly
— no dependency on Apple's as/ld toolchain for object code.
- macos-arm64 registered as a full target in the toolkit registry; a
macOS-built compiler correctly reports macos-arm64 as its own host.
- 40+ "self-cross-compile leg" commits incrementally teaching the arm64
backend enough of the compiler's own feature surface (generics,
interfaces, jumbo sets, closures, unit interfaces embedded in Mach-O
objects) to compile itself.
- On-device bring-up: hello-world, class-based programs, and the compiler's
own TestRunner run on Apple Silicon; the majority of the suite reaches a
clean summary with zero crashes.
- A dozens-strong cluster of layout-sensitive ARC/width fixes surfaced by
the self-cross-compile push — canonical adrp+ldr TLV access, descriptor-
driven interface tables (abstract/cross-unit/parent-chain), narrow-int
width handling, and chained field/record access.
- Remaining work: OPDF/debugger support on arm64, broader e2e coverage.
Threads are a known pdr gap on this target (PTRACEOTRACECLONE).
Tooling: BlaiseGuard (new)
A static analyser purpose-built for the Blaise dialect, reusing the
compiler's own lexer/parser/AST so it always tracks the grammar the
compiler currently accepts.
- Rule families: BL-1002/BL-1004 (unused identifiers), BL-2001–BL-2003
(reference cycles, string indexing), BL-2005, BL-3001/BL-3002
(duplicate detection), plus five rules covering defects the compiler
itself accepts silently.
- JSON/XML/HTML report formatters.
- Project-level config discovery and inline suppression comments — cut
BL-2003's false-positive rate by 94% this cycle.
- Documented rule-ID scheme (docs/BlaiseGuard README).
- Not bundled in the release tarball — build from source:
pasbuild compile -m blaise-guard --compiler <blaise-binary>.
Language
- Operator overloading (class operator) — parse, resolve, and lowering
landed end-to-end.
- Compile-time file embedding — {$EMBED 'path'} (byte array) and
{$EMBEDSTR 'path'} (string literal).
- varargs directive for binding C-variadic external functions.
- Subranges of enumerated types (TWeekday = Mon..Fri) — fixes GH #182 and
three follow-ups (array bounds/indexing over an enum subrange).
- Boolean accepted as an array index type; array[Boolean] accepted in an
inline typed constant (GH #208).
- High/Low of a subrange type return the subrange's own bounds, not the
base enum's (GH #160).
- Bit operators allowed in float constant expressions (GH #195).
- string/dynamic-array class static variables allowed.
- Subscript-terminated record chain accepted as an l-value (GH #187).
- A setter-backed property write is now reachable through a chained base
expression.
- div/mod signedness now follows the expression's result type rather
than its operands, on both backends (GH #196).
Examples
``pascal
{ Operator overloading }
type
TVec2 = record
X, Y: Double;
class operator Add(const A, B: TVec2): TVec2;
end;
class operator TVec2.Add(const A, B: TVec2): TVec2;
begin
Result.X := A.X + B.X;
Result.Y := A.Y + B.Y;
end;
{ Compile-time embedding }
const
Greeting: string = {$EMBEDSTR 'greeting.txt'};
{ Enum subranges }
type
TDay = (Mon, Tue, Wed, Thu, Fri, Sat, Sun);
TWeekday = Mon..Fri;
var
D: TWeekday;
begin
for D := Low(TWeekday) to High(TWeekday) do
WriteLn(Ord(D));
end.
`
ARC / runtime
- Static-array-of-managed-field ARC: scope-exit release and record/class
field walks for arrays of managed elements (BUG-017).
- Interface pointee reads/writes and sret-Result reads through a pointer
fixed across pointer-read, pointer-write, and interface shapes (BUG-012).
- An aliased sret assignment is now staged through a temporary instead of
zeroing a destination that aliases a call argument.
- Managed unit globals are released via a per-unit <Unit>_fini at program
exit; a program-level reference to global's captured environment is
released too.
- Two new diagnostic allocator modes: -dBLAISE_MEMPOISON (poison +
quarantine) and -dBLAISE_MEMDEBUG (double-free detection) in the
small-block allocator.
- Every valgrind e2e test now asserts zero ARC leaks under --debug.
runtime.math — pure-Pascal libm (new this cycle)
Blaise no longer links libm at all. The whole of the transcendental math
Blaise uses is now a from-scratch Pascal port of musl libc's fdlibm-derived
math sources (MIT-licensed), living in runtime.math.pas and lowered to
directly from all three backends:
- sin/cos/tan with full Payne–Hanek argument reduction, asin/acos/
atan/atan2, exp/expm1/ln/log2/log10/pow, sinh/cosh/
tanh, a correctly-rounded bit-by-bit sqrt, and floor/ceil/round
(half-away-from-zero, matching Blaise's documented Round rule).
- Double-precision kernels only; each backend widens Single arguments and
narrows results at the call site.
- Accuracy pinned at ~1 ulp by runtime/src/test/pascal/testblaisemath.pas
— roughly 190 glibc reference vectors checked at 2-ulp tolerance, with
exactness classes verified bit-exact.
- All three backends (QBE, native x86-64, native arm64) now lower the
float-math builtins to these RTL calls instead of external libm symbols;
arm64 gains the whole float-builtin family in the same change (previously
unlowered), and a float-typed Abs arm was added to native x86-64 that
had never existed (Abs(-2.5) previously returned -2.5 unchanged there).
- Consequence: --static freestanding binaries can now use Power and
friends — there was no way to static-link libm before — and results are
bit-identical across Linux, FreeBSD and macOS (GH #199,
BUG-20260730-native-libm-not-required).
stdlib
- Text.Regex — a new backtracking regular-expression engine.
- .From([...]) array-literal constructors for TList<T>, both dictionary
types, and TSet<T>, plus the stdlib's first dedicated Collections test
suite.
- TUuid value type (the GUID unit was renamed to UUID).
- AssertRaises / AssertNotRaises added to blaise.testing.
- Out-of-range list/collection access raises EListError instead of
crashing.
- Collection destructors correctly declared override so vtables resolve
correctly.
- Managed elements are released on TStack/TQueue/TSet/TDictionary
teardown (BUG-012).
- GCHashOf and read-only container lookups borrow their key instead of
retaining it.
Toolchain / linking
- Auto link mode: a program that binds no C library links freestanding
(no libc, no .dynamic) by default on Linux; binding external '<lib>'
or a bare libc symbol flips the link to dynamic+libc automatically.
--static/--dynamic force either mode explicitly.
- Dynamic linking support for freebsd-x86_64.
- The blaise_rtl.a` archive and its build/guard machinery were removed —
the compiler source-builds the
Blaise v0.13.0 — Changelog2026-07-11
Changes since v0.12.0 (266 commits: 113 feat, 95 fix, 26 test, 19 docs).
Async runtime & concurrency
- Stackful fibre foundation: context switch, trampoline, guard-page stacks (L0);
per-fibre exception state preserved across FiberSwitch.
- Fibre scheduler: timer heap + run queue, single-worker then **N-worker
multicore scheduler over a Chase-Lev work-stealing deque**, with a
persistent worker-thread pool.
- Structured concurrency: TTaskGroup nursery, fibre-aware synchronisation
primitives, fibre root exception frame and cancellation.
- epoll readiness reactor (L2) wired to the scheduler idle-park.
- Fibre I/O primitives (L3) and a WouldBlock errno-classification leaf.
- Allocator work supporting the runtime: pointer-width atomics, per-arena MPSC
remote-free queue + owner drain, widened block headers with owning-arena
back-pointer, munmap of large foreign frees (P4), abandoned-arena
reclamation (P5).
Networking stack (stdlib, fibre-native)
- Net.Tcp over async.io; Net.Tls client/server over an OpenSSL memory-BIO
provider (L4); Net.Uri URL/URI parser and builder.
- HTTP/1.1: fibre client (Net.Http.Client, with HTTPS) and a
fibre-per-connection keep-alive server.
- WebSockets (RFC 6455): fibre-per-connection server and a masked-frame
client.
- Mail: SMTP (AUTH + dot-stuffing), POP3, IMAP4rev1 clients.
- FTP client and passive-mode server; NNTP client and server.
- E2E loopback round-trip tests for TLS, HTTP, WebSocket, SMTP, FTP, and NNTP.
Language
- Anonymous methods / closures (Phases 0–10): reference to types,
capture-free literals, strong environment-record capture, Self capture +
method-pointer coercion, block-scoped/per-iteration capture, [Weak Self],
composition with generics, closure Spawn + closure-argument ABI, a
Functional type vocabulary, terse -> lambdas with target-typed inference,
two-phase deferred lambda inference in argument position, generic methods on
generic classes, and eager LINQ-lite (Where/etc.) + closure Sort on
TList<T>.
- Static (class-level) members within a unit and carried across separately
compiled units: static var, static function, static properties; qualified
static-var writes (TFoo.X := V); visibility enforcement
(private/protected/strict) on bare and qualified static access.
- Custom attributes reified: method-level attributes with constructor
arguments.
- Inline assembler: asm … end routine bodies.
- Units: unit-qualified references (UnitName.Symbol), cross-unit last-wins for
types/consts/vars, unit-qualified type disambiguation, directed lookup for
qualified field access.
- Enums: type-directed resolution of bare enum members; qualified
TEnum.Member.
- Types: forward class and interface declarations; named integer subrange as an
array index type.
- Lexer: #nnnn / #$hhhh Unicode-codepoint string literals.
- External lib name directive; link-library deps passed to the linker as
-l<name>.
Examples
``pascal
{ closure capturing an outer local }
type TIntFunc = reference to function(X: Integer): Integer;
var
Add: TIntFunc;
N: Integer;
begin
N := 10;
Add := function(X: Integer): Integer begin Result := X + N end;
WriteLn(Add(5)); { 15 }
end.
`
`pascal
{ '->' lambda + LINQ-lite }
uses Generics.Collections;
var
L: TList<Integer>;
Sum, X: Integer;
begin
L := TList<>.Create();
L.Add(1); L.Add(2); L.Add(3); L.Add(4);
Sum := 0;
for X in L.Where(x -> x mod 2 = 0) do
Sum := Sum + X;
WriteLn(Sum); { 6 }
L.Free();
end.
`
`pascal
{ static class-level members }
type
TCounter = class
static var Total: Integer;
static function Next: Integer;
end;
static function TCounter.Next: Integer;
begin
TCounter.Total := TCounter.Total + 1;
Result := TCounter.Total
end;
`
Targets & toolchain
- FreeBSD x8664** target: self-hosting, byte-identical native fixpoint on
FreeBSD, bidirectional Linux⇄FreeBSD cross-compilation with no external tools;
target-driven OS defines, per-target RTL unit list, syscall leaves, libc-free
threads/TLS, and freestanding _start. FreeBSD fixpoint + full suite run in
CI under emulation.
- RTL unification: RTL units relocated into the compiler tree (dotted-flat
names); RTL built from source on every link path; the internal assembler
assembles the Pascal RTL; blaise_rtl.a dropped from all self-host link
lines. IsUnmangledUnit recognises the runtime. prefix.
- libc-free static Linux binaries: direct-syscall kernel leaf, tiered
freestanding libc leaves, clone/futex threads, static TLS + mutex stubs; a
fully static binary links and runs.
- Internal assembler gained SSE2 + AVX2/VEX encoders, lock prefix,
xadd/neg, xchgq/cmpxchgq (REX.W), unsuffixed mnemonics,
mem-indirect jmp, endbr64/hlt/syscall; strips @PLT.
- Internal linker ships its own _start (drops system CRT), honours
--target's TLinkTarget, resolves duplicate globals via the canonical
symbol table, resolves absolute 32-bit relocations in static mode.
- BLAISE_BACKEND selects the backend when --backend is absent.
Codegen & ARC (fixes)
- GH #174: bare RTL class/interface/global symbols (typeinfo, vtable,
FieldCleanup, methods, itab, impllist, unit globals) now emitted weak**
in both backends, so the --no-incremental archive and whole-program QBE
links no longer collide.
- Float value width matched to slot/param width at store + spill sites;
unsigned 32-bit values zero-extended into 64-bit slots; scalar RHS
widened/converted on pointer-deref store.
- Record-return ABI: sret buffer for discarded record-returning method calls;
record-returning property getters use sret; inherited record-by-value returns
thread the sret pointer; self-assigned record method no longer aliases Self.
- itab dispatch of a record-returning method fixed on both backends; itab ref
for a non-virtual inherited interface method (#130 bug3).
- ARC: release string transients passed to Write/WriteLn; release
static-array-of-interface elements at scope exit; nested-proc capture of
outer var-param records/arrays; native ARC of managed fields on record copy;
statement-scoped deferred class-release (BUG-003, both backends);
discarded class-returning call result released.
- Native: @threadvar TLS address; call-site 16-byte alignment under pinned
pushes; spill implicit-Self args beyond six registers; record/aggregate
threadvars via TLS; honour owning unit for module globals.
- Empty loop body no longer crashes the compiler (#150); mandatory parentheses
on statement-position calls (#148); parentheses required on inherited calls.
Semantic
- Reject colliding same-named generic declarations across units (GH #171).
- Thread method Self into classic nested routines (BUG-008).
- Reject non-lvalue var/out actuals at every call form (BUG-011).
- Warn when a for-in loop variable is written (BUG-001).
- Reject class methods declared but never implemented; reject unsupported
memory-builtin forms with a native unknown-proc fall-through guard (BUG-035).
- Scope same-named nested routines to their enclosing body; tolerate
implementation-section circular dependencies.
Debugging (OPDF)
- recRuntimeHelper records for RTL release routines; complete recProperty
layout (method-name strings); recPrimitive for Double/Single; pointer
type record for PChar; escape string-constant values in the recConstant
.ascii line; shared CodegenMangle for class vtable symbol names.
stdlib
- Security.Crypto: SHA-256, MD5, HMAC-SHA256, ConstantTimeEqual (plus
existing SHA-1/Base64).
- Xml` read/write (Types/Parser/Rea
v0.12.02026-06-24
Blaise v0.12.0 — Changelog
Headline: the native x86-64 backend is now the default, with a complete
internal assembler and internal linker — Blaise compiles and links a binary
with zero external tools. Compilation is incremental (per-unit) by default,
and per-unit OPDF makes incrementally-built multi-unit programs fully
debuggable in pdr. Ships the first real standard library (JSON, crypto,
networking, exact decimals). QBE is now opt-in and deprecated.
Native backend & toolchain (default)
- Native x86-64 is the default backend; QBE is opt-in via --backend qbe
(deprecated, slated for removal in a later release).
- Internal assembler + internal linker are the default: blaise --source X
--output Y produces and links an executable with no external as/ld/gcc
(only the distro CRT objects are read).
- Internal linker: symbol resolution, static relocations, ET_EXEC,
then dynamic linking — GOT/PLT, CRT object discovery, PIE (ET_DYN) emission,
TLS relocations, .initarray/.finiarray, GOTPCRELX relaxation.
- Internal linker wired into the compiler driver; --assembler and --linker
accept internal|external (both default to internal on the native backend).
- Escape hatches: --no-incremental (whole-program build), --assembler
external, --linker external, --backend qbe.
Compilation model
- Incremental, per-unit compilation is the default (like FPC): each unit is
compiled to its own .o, then linked. Faster rebuilds; sidesteps the
whole-program assembly memory blow-up. --no-incremental forces the old
whole-program mode.
- Fixed a class of cached-interface (.bif) rebuild bugs so a warm-cache
rebuild is lossless and coherent (dropped unit-init calls, impl-only uses
dependencies dropped from the link, duplicate globals, and cached-.bif
method vtable-slot reconstruction).
- .bif interface format advanced to v2 (carries impl-section uses, unit
initialisation flag, generic template locals, parameter defaults, exit
values, and vtable facts); old .bif are rejected and recompiled.
- New WARMCACHEFIXPOINTOK guard plus an extended bif-coverage drift guard
covering the .bif interface container types.
Debugging (OPDF)
- Per-unit OPDF: every object (each unit and the program) carries its own
.opdf section; the linker concatenates them, mirroring FPC's multi-unit
layout. pdr can now set breakpoints, show cross-unit callstacks, and inspect
params/locals/fields inside dependency units of an incrementally-built
program — under both the internal and external toolchains.
- The internal assembler now carries the .opdf section; the internal linker
merges it (SHF_ALLOC).
Language
- Qualified type names: UnitName.TypeName, including dotted qualifiers
(System.SysUtils.TFormatSettings).
- Chained l-value assignment: Self.FStack[0].Count := value and similar
subscript-then-field chains.
- Writable string subscript with copy-on-write: S[i] := ch.
- Conditional compilation: symbol-presence {$IFDEF}/{$IFNDEF}/{$DEFINE}
with a predefined BLAISE symbol plus CPU/OS symbols (-d/--define).
- Sets over an integer-subrange base (set of 0..255) and Boolean set
operands; integer literals and ranges in const-decl set literals.
- Named integer-subrange types; forward routines in a program declaration
section; nested-proc-first unit implementation bodies.
Examples
``pascal
// native, one step — no external tools
// blaise --source hello.pas --output hello
program hello;
begin
WriteLn('Hello, Blaise 0.12!')
end.
`
`pascal
uses Json.Types, Json.Writer;
var o: TJSONObject;
begin
o := TJSONObject.Create();
o.Add('name', 'Blaise');
o.Add('version', 12);
WriteLn(o.AsJSON()); // {"name":"Blaise","version":12}
o.Free()
end.
`
`pascal
var s: String;
begin
s := 'hello';
s[0] := 'H'; // writable subscript, copy-on-write
WriteLn(s) // Hello
end.
`
Standard library (opt-in)
- JSON — DOM (Json.Types), parser (Json.Parser), reader (Json.Reader),
writer (Json.Writer).
- Encoding.Base64 — Base64Encode / Base64Decode.
- Security.Crypto — SHA-1 (Sha1, Sha1Hex).
- Security.Guid — RFC 4122 v4 GUIDs.
- Net.Sockets — IPv4 TCP.
- Net.WebSockets — RFC 6455 framing + handshake.
- Net.Http.Server — minimal HTTP/1.1 server with WebSocket upgrade.
- Numerics.Decimal (TDecimal, exact decimal) and Numerics.Money
(TMoney, currency-aware, configurable rounding).
- StrUtils additions — SplitChar, SplitLines, JoinList,
CodePointToString.
- blaise.testing unit-test framework moved into the stdlib; stdlib ships its
own test suite (pasbuild test -m blaise-stdlib).
Codegen / ARC / runtime fixes
- Float arguments to methods, constructors, and inherited calls are passed in
SSE (xmm) registers per the System V ABI, including the >6-slot overflow path
and on the callee side; float-returning method calls and implicit-Self
float-field reads are correct on both backends.
- Implicit-Self virtual method calls dispatch through the vtable (previously
bound statically — silently wrong for overrides, a link error for abstract
bases).
- HasClassAttribute emits the runtime call and the class attribute RTTI table
on the native backend.
- Record-copy uses field-width loads/stores; interface arguments to
record-returning routines; transient record-returning call receivers.
- 64-bit integer constants keep their full bit pattern (no truncation);
internal assembler encodes SSE movq/movd between XMM and GP registers.
Tooling / CI
- Rolling-bootstrap re-anchored at v0.12.0: the replay range is entirely
native-default with the internal toolchain — no QBE, no gcc.
- CI runs the bootstrap on master plus branch-scoped validate-only pre-flight
runs (ci/, feature/, bootstrap/**) that never write the master
carry-forward cache.
Verification
- Self-hosting fixpoint at 410,477 lines of QBE IR — FIXPOINT_OK,
NATIVEFIXPOINTOK, NATIVEINTERNALOK, and WARMCACHEFIXPOINTOK` all
green.
- 3,745 compiler tests + 57 stdlib tests passing.
Blaise v0.11.0 — Changelog2026-06-18
237 commits since v0.10.0. Grouped by area; each line is a notable change.
Native x86-64 backend
The native backend reached parity with QBE and enabled via --backend native.
- Multi-unit program support (whole-program model).
- By-value record parameters with full ARC; ABI-correct record-by-value returns (sret).
- Method calls returning records use the sret convention; interface/procedural/dynarray param and return types.
- Property reads via getter methods; property writes via setter methods.
- Nested (local) procedures with captured variables.
- TIndirectFuncCallExpr (callbacks as expressions); TIsExpr/TAsExpr/TSupportsExpr.
- ClassName/ClassType, ClassCreate metaclass construction; method calls with >6 argument slots in all call variants.
- Inc/Dec on field access, deref and var params; type-cast fixes.
- Trig/math builtins with Single-precision dispatch; float Format() (%f/%e/%g with width/precision).
- Const array data emission with ConstArraySymbol references; open-array literal args in method/inherited calls.
- File/process/path/math builtins for self-hosting; 32-bit comparison, sar, unsigned and mixed-float comparison fixes.
- Caller-side const-string ARC with a unified call-arg hoist region.
- Implicit-Self method calls with >6 register slots spilled correctly.
Toolchain independence
- Self-assembler for the native backend (--assembler internal) — emits ELF objects directly.
- Internal linker Phase A: ELF object + ar-archive reader and section merger (blaise.elfreader.pas, section merger in blaise.linker.elf.pas).
- Host-aware tool resolution with spec + prefix environment variables.
- Native fixpoint verification script (fixpoint-native.sh); internal-assembler conformance guard.
Language
Representative examples of the new syntax:
``pascal
// Constant folding (integer + float) and array constants
const
Tau = 3.14159 * 2;
Grid: array[0..1, 0..1] of Integer = ((1, 2), (3, 4));
// Static-array bounds: expressions and enum indices
const N = 8;
type TColour = (Red, Green, Blue);
var
Buffer: array[0..N - 1] of Byte;
Hits: array[TColour] of Integer;
// Sets: ordinal element types, ranges, subset/superset
var Digits: set of Byte;
Digits := [0..9];
if [1, 2] <= Digits then ...; // subset operator
// Default array property
WriteLn(List[0]); // TList<Integer> via List[i]
// inherited in expression position; for-in over codepoints
Total := inherited Sum() + 1;
// codepoint iteration strings (utf-8)
var CP: integer;
for CP in 'héllo' do WriteLn(CP);
// byte iteration over string
var B: byte;
for B in 'héllo' do WriteLn(B);
`
- Compile-time integer constant expressions (#96); floating-point constant folding (const X = 3.14 * 2, #108).
- Promote integer initialisers to float for Double/Single vars and typed consts.
- Multi-dimensional static arrays and multi-dimensional array constants.
- Named constants and expressions as static-array bounds (array[0..N], #109).
- Enum-indexed static arrays in var/type declarations (array[TEnum], #114).
- set of Byte/Boolean ordinal sets (#105); range syntax in set literals ([lo..hi]); subset/superset operators; enum sets up to 64 members (#81); jumbo sets up to 256 members.
- Generic methods (method-level type parameters) and an out-of-line impl form with argument checking.
- Default array properties — Obj[I] sugar; List[i] on TList<T>; Items default property on TDictionary/TOrderedDictionary.
- inherited Method() in expression position; interface properties; implicit-virtual constructor dispatch via metaclass.
- Implicit integer→float widening for math builtins and float typecasts.
- Initialised global variables (var G: T = value); inline set types in any type position.
- Guaranteed zero-initialisation of all variables — a language semantic: ints 0, floats 0.0, pointers/classes/interfaces nil, strings empty, records/arrays recursively zeroed. Also makes output deterministic across backends (native previously left scalar locals as stack garbage while QBE zeroed them).
- array of const (heterogeneous variadic parameters); case-label ranges and Succ/Pred ordinal builtins.
- for..in over a string iterates Unicode codepoints (Integer var).
- Reserve module names as identifiers; reject variables shadowing a type name (#102); clear diagnostics for packed/bitpacked arrays.
ARC / runtime
- Integer div/mod by zero raises a catchable EDivByZero.
- One-time RTL setup runs via a _BlaiseInit startup hook.
- ARC parity fixes across record-field, ExprOwnsRef, and interface-in-field stores; chained-field-store and program-exit global release fixes.
- _Utf8DecodeAt helper for UTF-8 codepoint decoding.
stdlib
- StrUtils: clean literal replace API — Replace (first) + ReplaceAll; UTF-8 codepoint functions.
- Hash indexes for TDictionary, TOrderedDictionary, TSet, and unsorted TStringList.Find/IndexOf.
Codegen (QBE)
- ABI-correct record-by-value returns for C-FFI.
- Function-returning-interface and interface-field assignment via the sret convention; weak interface vars + interface type-cast fix.
- String relational operators (< > <= >=); Boolean xor emitted correctly (was ceqw).
- Fixed-size static array returned by value via sret (#112); chained element write on dynamic-array-of-dynamic-array.
- Class const accessed via the type name (both backends); virtual-dispatch property accessors through the vtable.
- 0-based string iteration corrected in FNV-1a hash loops.
Semantic
- Resolve inherited property accessors to the declaring class (#111); honour interface inheritance in type compatibility.
- Merge method overload sets across inheritance; generic class implementing a non-generic interface; inherit non-generic class from a generic instance.
- Repair generic instance methods when a type alias precedes the impl (#124); typed array const with a named type alias (#113).
Debugging (OPDF / pdr)
- Native-first debugging: exact frame offsets, statement-level line info.
- Field drilldown — unit-class symbols, Self typing, record-param shadows; indirect variable locations.
- --debug-opdf binaries link as PIE
- open-array debug info (ArrayKind=2 + companion slot).
- Leak tracker extended to strings and dynamic arrays, with allocation-site (unit:line) info.
Performance
- Overload groups replace per-call index scans in the semantic pass.
- Stack buffers for WriteDecimal and Format; inlined header checks in _StringRelease.
- SIMD-accelerated UTF-8 codepoint counting (SSE2 + AVX2)
- Amortised byte buffers in the internal assembler's ELF writer.
- Borrowed-local and shape-aware const-string argument ARC.
Tooling / CI
- bif-coverage verifier for AST/encoder/decoder drift.
- Per-backend CLI option contract (Chain of Responsibility); reject --emit-ir/--emit-asm` with an incompatible explicit backend.
- GitHub Actions rolling-bootstrap pipeline; CLI-contract and internal-assembler tests in CI.
Summary
- Self-hosting fixpoint verified on 371,292 lines of QBE IR.
- QBE, native, and internal-assembler fixpoints all green.
- 3,474 tests passing.
Blaise v0.10.0 (alpha) — Incremental compile, Native Backend and more2026-06-07
Released: 2026-06-07
Language
- Mandatory () on all zero-argument function/procedure/method/constructor calls
- Procedure-field invocation: Obj.ProcField() dispatches through stored code pointer
- Removed IsNoArgFuncCall / NoArgFuncDecl dead code from AST and codegen
- Diamond operator: infer generic type args from LHS in assignments (TList<>.Create())
- Exit(Value) shorthand for function-result early returns
- not operator extended to integer types (bitwise complement)
- Set-valued constants (const X = [a, b]) and set literals as set of arguments
- threadvar support for thread-local storage
- out parameter mode tracked distinctly from var
- Calling convention directives (cdecl, stdcall) preserved on routine declarations
Native x86-64 Backend
- M1: empty program compiles and runs
- M2: integer arithmetic, Write/WriteLn
- M3: if/while/repeat control flow
- M4: records, static arrays, integer variables, for loops
- M5: user functions, parameters, recursion, break/continue/exit, var/out params, indirect calls, >6 args via stack, wider integer family
- M6: float (Double/Single) parity
- M7a: record-returning functions (sret)
- M7b: class system — method dispatch, vtables, constructors, destructors, method pointers
- M7c: string operations parity
- M7d: exception handling (try/except/finally)
- M7e: open arrays and dynamic arrays
- M7f: interface dispatch through itab
- M8: var/out arguments to method calls, inherited calls
- Full generics support (monomorphised classes, records, interfaces, free routines)
- For-in and case statements
- Inc/Dec built-ins and class-local ARC
- .Free intrinsic
- TAddrOfExpr, TDerefExpr, TPointerWriteStmt
- ARC retain/release for string/class/interface value params and field assignments
- Array field subscript read and var-param validation
- Interface parameters in method/constructor/inherited calls
- ICodeGen interface for backend dispatch
Incremental Separate Compilation
- .bif (Blaise Interface File) format — compact unit-interface serialisation
- .bif embedded inside .o files for zero-extra-file discovery
- --incremental flag: skip unchanged units, reuse cached .o + .bif
- Parallel incremental compilation via worker threads
- Resolved all EImportError crashes in warm incremental compile
- .bif covers: constants, types (simple, record, class, interface, generic templates), routines, globals, inline bodies, calling conventions
- .bif validation header with compiler ID and source hash
- TUnitInterface export/import for classes, interfaces, records, generics, virtual methods, override vtable slots, implements lists, attributes
- Per-unit symbol cache for uses-chain retrieval
- Layered symbol lookup — current-unit before uses-chain
- Unit-prefix symbol mangling for free routines, classes, and address-of
ARC & Memory
- Atomic ARC refcount operations for thread safety
- Mutex-protected weak reference table for thread safety
- Per-thread memory allocator via threadvar
- Thread-local exception globals
- TThread.Create(False) joins on Free() via ARC
- Release old value when assigning nil to a class variable
- Emit _ClassAddRef when assigning Pointer to class-typed variable
- Release owned RHS when storing to [Unretained] class field
- Retain/release by-value interface params in callee
- Elide retain/release for const string and class params (perf)
- Elide const-param retain/release, retain transient args (perf)
Codegen (QBE)
- Unit-prefix mangling for multi-unit builds
- System-unit defs emitted in unit-mode
- Generic interface-instance typeinfo in multi-unit builds
- WriteLn(Double/Single) no longer crashes QBE with type mismatch
- Unsigned 32-bit values print as unsigned in WriteLn
- @RecordField inside methods and pointer-to-record deref
- Record method calls in statement position
- Var/out params passed by reference in inherited calls
- Method interface param passed as fat pointer
- Generic class name mangled in itab symbol for interface assignment
- Leak-tracker typeinfo reference uses class unit prefix
- For-in class enumerator calls use method's unit prefix
- Program-scope generic methods don't get unit prefix in ResolvedQbeName
- Class fields shadow same-named program globals in method bodies
Compiler
- --dump-ast flag for post-semantic AST inspection
- --skip-dep-codegen for unit-as-top-level builds
- Generic record support (monomorphisation)
- Retain generic templates so repeat instantiation works
- Auto-tag OwningUnit on global Define
- FDefineOwningUnit, FCurrentUsesChain, BuildUsesChain, LookupViaUsesChain
- Member-lookup visibility seam (IsVisibleFromUnit)
- Accept set literals as set of arguments
- Remove FPC conditional-compilation directives
Runtime & Standard Library
- WriteLn prints True/False for Boolean values
- TStringList.Text / LoadFromFile preserve verbatim lines
- Drop legacy platform aliases; derive constants from target
- Runtime split: drop 7 build-driver shims, use unit-as-top-level
- RTL build switched to unit-as-top-level
Kanban Tool
- TUI Kanban board application (new)
- CLI mode for non-interactive task creation
- UTC datetime storage with local display
- External file change detection and merge
- Rounded box-drawing corners and coloured borders
- Moved from examples/ to tools/ as a PasBuild module
Tests
- 2627 tests passing (up from 2293 in v0.9.0)
- Native backend E2E suite runs through both QBE and native backends
- Standalone pointer-to-record field deref test
- Nested record field assign + method call tests
- Separate-compilation round-trip E2E tests
- Implicit System unit reachable without explicit uses
- Test runner includes stdout in e2e exit-code mismatch messages
Tooling
- Rolling-bootstrap script (scripts/rolling-bootstrap.sh) for development-checkout builds
- Fixpoint script drives runtime build with stage-1 binary explicitly
Summary
- 262,202 lines of verified QBE IR at fixpoint
- 2627 tests passing
- FIXPOINTOK** — self-hosting verified
Blaise v0.9.0 (alpha) — Runtime port & bug squashing2026-06-02
Changelog — Blaise v0.9.0
Fixpoint: stage-2 == stage-3 at 166,479 lines of QBE IR (up from 135,311 in v0.8.0).
Test suite: 2,293 tests, 0 failures.
---
Runtime — C elimination
- Port blaisearcclass.c to pure Pascal (blaise_arc.pas)
- Port blaiseexc.c to Pascal + x8664 assembly (blaisesetjmpx86_64.s
remains as the only non-Pascal file)
- Port blaise_weak.c to pure Pascal
- Port blaise_float.c to pure Pascal Grisu1 float-to-string implementation
- Port blaisestrfmt.c to pure Pascal _StringFormatN
- Consolidate blaiseio / blaiseprocess / blaisesys / blaisetime
into rtl.platform.posix Pascal unit
- Enable pipefail in the runtime Makefile so compiler errors fail the build
FFI / Codegen — interop correctness
- Records by value through SysV aggregate ABI: record-by-value parameters
now use QBE :ffi<Name> aggregate types so fields are scattered into
INTEGER/SSE registers per the platform ABI. Applied uniformly to all call
sites (external and intra-Blaise), so callbacks are consistent. Win64 ABI
comes from QBE for free. Previously, a bare l <addr> was passed and the
callee read the pointer bits as struct contents.
- Single field alignment corrected to 4 bytes (was falling through to
the 8-byte catch-all, doubling the size of Single-heavy records and
breaking C struct interop)
- Double literal narrowed to Single on record field store — previously
emitted stores d_<lit>, ... which QBE rejected as a type mismatch
- Double expression narrowed to Single before FFI call — a Double-
typed actual passed to a Single formal put 8 bytes into the float slot;
the C callee read the low mantissa half as IEEE-754 single (noise)
- Narrow FFI return values masked to declared width: Byte/Boolean
returns are ANDed with 255, Word with 65535, SmallInt sign-extended
via shl 16 / sar 16. C ABI leaves upper bits undefined for sub-int
returns; callers observing the full word saw garbage.
- @A[i] on dynamic arrays — EmitAddrOfExpr now has a tyDynArray
branch mirroring the open-array path. Previously raised "Unsupported
L-value form for var argument".
- Overloaded Destroy in ARC field-cleanup — EmitFieldCleanupFn now
calls the overload-mangled symbol (stored as DestroyResolvedQbeName on
TRecordTypeDesc) rather than the bare <Class>_Destroy label, which was
never emitted for overloaded forms, causing a linker undefined-symbol error.
- Fix storel for proc-pointer static-array slots; add Expr()() postfix call
- Use narrow load/store for implicit-Self Byte/Word/SmallInt fields
- Fix QBE types for Single float arithmetic and comparisons
- Emit correct data items for typed array consts inside function bodies
- Fix ARC retain/release on array element writes
- Allocate 16 bytes for procedure-of-object class fields
- Retain/release class refs stored through typed pointer
- Nil class/string field slots after .Free to prevent double-free
- Load class pointer before offsetting in var-param L-value
- Preserve ARC variables across try/finally re-raise
ARC — correctness
- finally blocks run on non-local exit (Exit, Break, Continue)
via FFinallyStack — previously skipped entirely on non-local unwinds
- [Unretained] attribute for non-owning class references (back-pointers,
AST Resolved*Type fields, symtab links) that must not participate in ARC
- Release +1-owned temporaries produced by function/property returns when
used transiently or passed as value arguments
- Release +1-owned receiver temporaries after method calls
- Honour [Weak] on implicit-Self class field assignments
- Retain caught exception when binding to handler variable (except E: T do)
- Eliminate double-_ClassAddRef in constructor-with-args codegen
- Eliminate double-_ClassAddRef on function-return class assignments
- Wire owned-arg-temp release into all remaining call paths
- Remove 50+ redundant Free calls from AST destructors (field cleanup
already handled by ARC)
- Remove redundant Free calls from symbol-table destructors
Language — new features
- Nested procedures with captured-variable closure (full access to
enclosing scope locals)
- Custom attributes — [MyAttribute] / [MyAttribute(args)] on any
declaration; compiler validates attribute class and resolves constructor
- [Unretained] non-owning reference attribute
- SmallInt and Word — 16-bit signed/unsigned integer types with correct
narrow load/store and Byte/Word field packing at 1-byte / 2-byte stride
- UInt64 / QWord — 64-bit unsigned integer type
- packed record — suppresses per-field alignment padding
- sar arithmetic right-shift operator
- High / Low extended to all ordinal types; targeted float error message
- SizeOf(expression) — previously only SizeOf(TypeName) was accepted
- / is real division — distinct from div (integer division)
- for..in over dynamic arrays
- Octal / binary literals (0o777, 0b1010) and underscore separators
in numeric literals (1000000, 0xFF_FF)
- Integer-type typecasts in const initialisers — Cardinal(-11),
Byte(255), SmallInt(-1), etc., with correct bit-width truncation and
sign extension
- Bit-op chains in const initialisers — FGBLUE or FGGREEN, 1 shl 8,
$FF and 15, A xor B, including mixed literal+named chains and array
elements; folded at semantic time
- ArcSin, ArcCos, Sinh, Cosh, Tanh math builtins with Single
dispatch overloads
- Extend High / Low to dynamic array types
- Allow direct invocation of proc-typed class fields
- Allow implicit integer-to-float assignment; reject implicit float↔integer
Semantic — fixes
- Implicit Self member no longer shadows unit-level symbol
- Nested procs with the same name in different outer procs no longer ambiguous
- Clone method bodies per generic instance (was sharing mutable AST nodes)
- Allow two instances of the same generic class in the same scope
- Wire up parent class on generic instances
- Walk parent chain when resolving inherited properties
- Register var decls before analysing method bodies
- Use overload resolution for constructor calls
- Emit support data for generic classes declared in a unit
- Normalise all identifier references to declared casing
- Reject duplicate identifiers across const and var sections
- Report missing units even when no --unit-path is given
- Fix SizeOf(expression) to resolve the expression type
Threading
- TThread, TCriticalSection, and full POSIX thread bindings
- Self-referential thread lifetime under ARC (thread holds own refcount during
Execute, preventing use-after-free on fire-and-forget patterns)
- [Threaded] E2E test suites run as parallel subprocesses
Stdlib / Performance
- GetText and GetCommaText rewritten to avoid O(N²) string concatenation
- TList<T>.IndexOf added
- TListEnumerator<T> + TList<T>.GetEnumerator — for..in over generic lists
- _ClassRelease elision for provably-nil slots (codegen perf)
- Remove all dead {$IFDEF FPC} compiler directives
Developer experience
- --debug leak reporter — shows refcount per live object at program exit
- blaise.cfg — automatic unit-path discovery from project directory
- Multiple --suite filters accepted by the test runner
- --emit-ir path now exits through normal cleanup instead of Halt(0)
- UTF-8 bytes in comments: regression tests added to lexer suite
Compiler internals / Build
- Mark Resolved*Type AST fields [Unretained] — prevents spurious retain
cycles on type descriptors shared across the AST
- Remove all old FPC compiler directives no longer needed in Blaise
- --cache-dir fla
Blaise v0.8.0 (alpha) — House Cleaning🧹 & Performance预发布2026-05-17
Blaise Compiler — Changelog for v0.8.0
=================================
Released: 2026-05-16
Previous: v0.7.0 (2026-05-13)
Commits: 62 between v0.7.0..v0.8.0
HEADLINE
------------------------------------------------------------------------
v0.8.0 is the first release with a Pascal-native memory allocator.
The compiler RTL, codegen builtins, and all C runtime helpers route
through blaisemem (BlaiseGetMem / BlaiseFreeMem / BlaiseReallocMem)
instead of libc malloc.
blaisemem beats libc malloc on three of five microbenchmark workloads**
(small alloc, mixed sizes, retain+free-all) and delivers a ~10 %
real-world compile-time win on the 1934-test suite (~89 s → ~80 s).
NEW LANGUAGE / SEMANTICS
------------------------------------------------------------------------
* Dynamic arrays (array of T) — full implementation: SetLength,
Length, Copy, indexed read/write, ARC-managed lifetime.
* Typed constants — const Name: Type = Value with array literals
for both fixed-range and array-of-enum forms.
* Class-level array constants — constant arrays declared inside a
class body, addressable via TypeName.ConstName.
* Range-indexed array constants — array[0..N] of T = (...).
* Abstract methods and abstract classes — virtual; abstract; syntax,
with a runtime tombstone (_AbstractMethodError) that aborts with a
clear message if a vtable miss reaches it.
* Explicit ordinal values in enum definitions — (A = 1, B = 5).
* Record methods — methods declared inside a record definition.
* for .. in over sets — iterate the members of a set of T.
* Supports() intrinsic for interface queries.
* Open-array coercion — pass static-array variables directly to
array of T parameters.
* Named array type aliases in the type section — type TArr = array[..]
of T;.
* Length() extended to accept open-array and static-array
parameters in addition to strings and dynamic arrays.
* Five-type date/time model with full DateUtils unit (records-based;
TDateTime, TDate, TTime, plus formatting / arithmetic helpers).
Read more.
* Generic vars at unit scope and non-identifier interface arguments
now parse and analyse correctly.
* Overload resolution now considers the implicit-self expression
path, matching Delphi/FPC behaviour.
RUNTIME / STANDARD LIBRARY
------------------------------------------------------------------------
* Streams stack (read more):
- TInputStream / TOutputStream + file and memory streams.
- buffered wrappers with error propagation.
- TStreamReader / TStreamWriter text wrappers.
- TBuffer segment rope + byte-dereference fixes.
- CopyStream and capability markers; interface ABI fixes.
Pascal memory allocator (blaisemem) — mmap-backed, with size-class
freelists for small allocations, a LIFO cache for large allocations,
in-place mremap-based realloc for large blocks. 28 correctness
tests in runtime/src/test/pascal/testblaisemem.pas.
* Path manipulation functions ported from C to Pascal (ChangeFileExt,
ExtractFileName, ExtractFilePath, ExtractFileDir, ExtractFileExt,
IncludeTrailingPathDelimiter, ExcludeTrailingPathDelimiter).
* TComponent — minimal ownership/notification class.
* TStringList — CustomSort + CommaText property.
* StrUtils — pure-Pascal port.
* SysUtils — ExpandFileName.
* Math unit — math compiler builtins (Min, Max, Abs, Sign, etc.).
* IMap<K, V> interface — generic dictionary contract with itab-based
dispatch for generic→interface use.
* bcl.testing extended with AssertNotEquals, AssertContains, and a
--verbose CLI flag.
* RTL split into runtime/ (always-linked) and stdlib/ (opt-in).
Testing framework renamed bcl.testing → blaise.testing.
* LineEnding, sLineBreak, DirectorySeparator, PathSeparator moved
from rtl.platform to system.pas.
* Platform layer renamed bcl.platform → rtl.platform with expanded
SysUtils.
COMPILER OPTIMISATIONS
------------------------------------------------------------------------
* Function inlining (phase 1) — small leaf functions are inlined at
call sites when address-taken and ARC-free. Inlinability decided
by uSemantic; codegen walks the callee body into the caller frame.
* Function inlining (phase 2) — case statements now allowed inside
inline candidates, and the body-statement cap raised from 8 to 24.
This unlocked inlining of blaise_mem's SizeClassIndex and
SizeClassBytes.
* mem2reg promotion for tyPointer / tyPChar locals — non-address-taken
pointer locals are promoted to QBE temps instead of alloca slots,
yielding direct register access on every read/write.
Sanity checker in StringRelease — verifies the string header looks
plausible (refcount, length, capacity within sane bounds) before
treating refcount==0 as a free signal. Aborts with a clear stderr
message on corruption.
BUG FIXES
------------------------------------------------------------------------
* P[I] := Chr(N) no longer stores the low byte of a heap string
pointer. EmitByteRhs short-circuits Chr() in byte-store contexts
and emits the integer value directly, skipping the _Chr allocation.
Applies to PChar subscript writes, dynamic- and static-array byte
subscript writes, and byte-typed pointer writes.
* Static-array element stores of PChar values no longer truncate to
32 bits. tyPChar was missing from the storel / loadl / alloc8
case branches and fell through to storew, silently zeroing the
high 32 bits of every heap pointer. Fixed across five sites in
uCodeGenQBE.pas.
large-alloc LIFO cache in blaisemem — IsLarge() was reading the
wrong field of TLargeHeader (AllocSize: Int64 overlapped with the
Flags slot it probed). Fix made the cache reach ~100 % hit rate
on 64 KB allocations, dropping the L workload from 33 ms to 0 ms.
* Static-array variables now coerce correctly when passed to open-
array parameters.
* Stale rtl/ directory references in E2E tests updated to
runtime/ after the directory split.
POSIXCSOURCE bumped to 200809L to expose mkstemp() on glibc.
PERFORMANCE
------------------------------------------------------------------------
Allocator microbench (median of 3 runs, milliseconds), 1 M small alloc/
free, 500 k mixed-size, 100 k 5-step realloc, 10 k × 64 KB, 100 k
retain-then-free-all:
``
Workload | libc malloc | blaise_mem | ratio
-------------------------------+-------------+------------+--------
Small alloc/free (1M × 32 B) | 8 | 7 | 0.88x
Mixed sizes (500k × var) | 5 | 4 | 0.80x
Realloc growth (100k × 5) | 5 | 8 | 1.60x
Large alloc/free (10k × 64KB) | 0 | 0 | —
Retain+free-all (100k × 64B) | 5 | 4 | 0.80x
`
Real-world compile workload (Blaise test suite, 1934 tests):
Pre-cutover (v0.7.0 baseline): ~89 s
Post-cutover (v0.8.0 release): ~80 s (~10 % faster)
DOCUMENTATION
------------------------------------------------------------------------
* Testing strategy document — explains the unit / E2E / punit
three-layer split and when to use each.
* Stream I/O design rationale.
* Generic Interfaces and Collections Framework rationale.
* Cold-bootstrap RTL chicken-and-egg issue documented.
* Migration analyser rule: detect TObjectList → TList<TObject>`.
* Future-improvements: enhanced enumerations section.
* benchmark.txt expanded with a long-term tracking format and entries
for each performance milestone in the cycle.
* Run procedure for the bench scri
Blaise v0.7.0 (alpha) — Independence Day 🎉预发布2026-05-13
Released: 2026-05-13
This release marks a milestone: Blaise is now fully independent of
Free Pascal. FPC is no longer required anywhere in the toolchain.
The bootstrap chain is: *released Blaise binary → compiles source →
new Blaise binary*. From here on, every release builds the next.
Highlights
FPC Independence
- The compiler is fully self-hosting. releases/v0.7.0/blaise is
the new stage-1 bootstrap binary — no FPC installation required.
- The fixpoint script (scripts/fixpoint.sh) auto-picks the latest
release binary as stage-1 and includes a stage-4 fallback for
cross-release bootstrap gaps.
- Fixpoint verified: stage-2 IR == stage-3 IR (116,462 lines).
Test Suite Now Runs Under Blaise
- All 1,268 tests compile and run using the Blaise-compiled test
runner. The test runner is no longer built by FPC.
- The test framework migrated from fpcunit to bcl.testing — 57
test units converted in a single pass.
Language & Codegen
- Low() and High() now work on strings (in addition to arrays).
- Fixed implicit-self method calls that pass var/out or
open-array parameters — two symmetric paths in EmitProcCall
and EmitExpr (uCodeGenQBE.pas).
- Fixed global static array codegen bugs affecting for..in loops.
- Fixed for..in promoted scalar variable handling.
RTL
- Fixed a buffer overflow in _GetTempFileName when the directory
is empty and TMPDIR is set.
- process.pas renamed to lowercase for the case-sensitive unit
loader.
Build & Infrastructure
- README.adoc updated with FPC-free build and bootstrap
instructions, including the BLAISE= make override needed for
cold bootstraps from a clean checkout.
- blaise_rtl.a included in the release archive — end users can
now link their compiled programs without building the RTL from
source.
Download
| File | Description |
|------|-------------|
| blaise-v0.7.0-linux-x86_64.tar.gz | Compiler binary + RTL + docs (Linux x86-64) |
The archive contains: blaise, blaise_rtl.a, README.adoc,
LICENSE, NOTICE.
Bootstrap
Unpack the release archive into releases/v0.7.0/ inside your
clone of the repository:
``shell
mkdir -p releases/v0.7.0
tar -xzf blaise-v0.7.0-linux-x86_64.tar.gz \
--strip-components=1 \
-C releases/v0.7.0
Then build:
1. Build the RTL (BLAISE= avoids chicken-and-egg on clean checkout)
cd rtl && make BLAISE=../releases/v0.7.0/blaise && make install && cd ..
2. Compile
releases/v0.7.0/blaise \
--source compiler/src/main/pascal/Blaise.pas \
--unit-path compiler/src/main/pascal \
--unit-path rtl/src/main/pascal \
--emit-ir > /tmp/blaise.ssa
vendor/qbe/qbe -o /tmp/blaise.s /tmp/blaise.ssa
gcc -o compiler/target/blaise /tmp/blaise.s compiler/target/blaise_rtl.a
``