Repository navigation
Blaise v0.16.0 — Changelog
Changes since v0.15.0 (396 commits, 2026-10-23 to 2026-11-28).
Breaking changes
Intis the width of lengths, indices and literals (type standardisation). An unhinted integer literal isInt; built-in lengths, positions and ordinals areInt; string and dynamic-array lengths are 64-bit; collection counts and indices areInt;MaxIntisHigh(Int). Integer arithmetic narrower than 64 bits is promoted toInt64.- The classic type names are no longer built-ins.
Integer,Cardinal,SmallInt,Word,QWord,PtrUInt,SingleandDouble(and theirP-prefixed pointer types) come fromuses ClassicPascalTypes; an unknown classic name gets an error naming its replacement, and BlaiseGuard BL-2006 suggests each one. cdeclis the only calling-convention directive.register,pascal,stdcalland the others are rejected; a routine without a directive uses the Blaise convention.cp-migratereports them in ported code (rule MIG-CALLCONV). The calling convention is now part of a procedural type.WriteFileandAppendFilefail loudly. A failed write raisesEInOutError(with the OS error code) when SysUtils is used, and stops the program with runtime error 101 otherwise. Previously the failure was silent.- OPDF format version 2. The header names the format version; use the
pdrshipped with this release (or opdebugger master). - A parameterless interface method, and a chained call statement, need
()like any other call.
Platforms
- Windows x86-64 is a shipped target.
--target windows-x86_64produces PE32+ executables with no external toolchain: a PE32+ image writer and linker over ELF objects, unwind data, the PE TLS model for threadvars, Win64 calls at the foreign boundary, stack probes, and an export check against the real DLLs. - The Windows runtime: files, directories, time, processes, the command line, random bytes (bcrypt, loaded on first use), BSD sockets over Winsock, fibres and the scheduler, IO.Files, IO.Process and IO.Watch, all through the platform port. A program imports only kernel32 unless it uses more.
- Windows paths: drives, UNC paths and
ExpandFileName;ParamStr(0)is the program's full path. - TLS on Windows uses OpenSSL 3's DLL names, and a verifying client trusts the system's root and CA certificate stores.
- The Windows compiler self-hosts:
blaise.exerebuilds itself byte-identical in a Windows 11 guest and on CI's windows-latest runner. TargetOSandTargetCPUconstants name the build target;Platform.Infogives display names.
Exceptions and ARC
- An exception releases what it unwinds past. Unwind tables and a frame-pointer walk now release a frame's scalar and aggregate slots, a function's managed
Result, owned call-argument and string-operand temporaries, deferred-release bases, values parked by built-ins, record-call arguments, and the main program's temporaries. Code that raises no longer leaks. - A
[Weak]or[Unretained]record field takes no reference; weak references register and release in constant time. - A discarded result of a receiver or interface method call is released; a receiver the caller does not own is kept alive for the call.
TObject.AfterConstructionruns once construction has finished;TThread.Create(False)starts the thread after construction, releasing a runningTThreadterminates it, andFreeOnTerminateis supported.- The program's globals are released before its units are finalised.
Language
- Generic type arguments are inferred from a call's arguments:
Max(3, 7). Copy,+,Concat,DeleteandInserton dynamic arrays (FPC semantics);Concaton strings.modaccepts floating-point operands.- Typed-pointer arithmetic counts in elements.
- Static vars of generic types, with one slot per instance; overloaded methods in generic classes and records; member constants of generic classes and records.
- A set parameter may default to a set constant.
- A nested anonymous method shares its enclosing one's environment, and a closure whose literals never use
Selfholds it unretained. - Dynamic-array indices are bounds-checked at run time, and an element write evaluates array, index and value left to right.
- Warnings: a closure made in a loop that captures a variable the iterations share;
downto 0over an unsigned loop variable; opt-in--warn-narrowingfor implicit integer narrowing.
Semantic
- Overload resolution never narrows an argument a candidate can hold; an integer argument prefers a
Float64overload; an enum ranks as a 4-byte ordinal. - A generic constraint error is reported at the instantiating use, naming its unit; an interface constraint accepts every type that converts to it.
SizeOf,HighandLowof a type fold in constant expressions; constant expressions overUInt64and Boolean operands, and integer casts in constants, keep their type.'->'lambdas work as arguments to constructors, static, interface and indirect calls, and in generic bodies.- A routine, variable or type may shadow a System constant; a property hides a same-named inherited method for a bare read.
- An implementation-use unit cycle is analysed in interleaved phases.
Codegen
- A method named like a built-in (
Write,WriteLnand others) is that method, on both ISAs. - A method call through an interface
Resulton x86-64 reads the caller's buffer. - A failed
ascalls the RTL with an aligned stack on x86-64. - Record results from foreign routines, foreign entries that return records, and calls through
cdeclprocedural values on x86-64. for..inover closures keeps each closure's environment; afor..inloop's enumerator is not held again forMoveNextandCurrent.WriteLnof aFloat32prints 7 significant digits on arm64, as on x86-64.
stdlib
- IO.Process: child processes with stdin, separate stdout and stderr pipes, their own environment, and
RunProcessfor the common case. - IO.Watch: notification when files and directories change.
- IO.Files.FindFiles, a recursive file finder.
- JSON: typed accessors on objects and arrays (
Strings[],Integers[],Booleans[],Objects[],Arrays[]) andFindPathfor a dotted path. - Math:
RandomandTRandom(auto-seeded, reproducible from a seed, unbiased),Frac,DegToRad,RadToDeg,ExpandExpm1. ReadLnreads a line from standard input;IsTerminalandGetUserDir.TList.InsertandAddRange;TDictionary.KeysandValues;TDictionary.Removeis O(1) amortised.TDecimalandTMoneygain arithmetic and comparison operators.THttpResponse.AddHeader;TStringList.Textends a line at LF, CR LF or a lone CR.Formatsupports%u.
Toolchain and CLI
--checkanalyses without generating code, and--diagnostics=jsonwrites one JSON object per problem, for IDEs.--emit-xrefwrites each identifier use and its declaration;--emit-tokenswrites the lexer's tokens;--print-unit-pathsprints the unit search order.- Every target's objects carry
.blaise.importslink metadata, and a warm build binds the libraries of units reached only through a cached unit's implementation. - A uniquely owned dynamic array grows in place.
Debugging
- The release archives include the pdr debugger. The macOS arm64, Linux x86-64 and FreeBSD x86-64 archives carry
pdrandpdr-dap(its Debug Adapter Protocol server for IDEs; Hexagram uses it). pdr is Free Pascal-built, BSD-3-Clause (LICENSE-pdr). Build with--debug-opdf, then runpdr <program>. - pdr now debugs macOS arm64 programs, including breakpoints hit on any thread.
- On Linux, pdr and pdr-dap need glibc 2.34 or later, and do not yet stop at breakpoints in threads other than the main one. The Windows archive has no pdr yet.
- OPDF records arm64 debug facts, links a nested routine's scope to its parent, and names its format version.
Tooling and CI
blaise.testinggains--format=json, one result per test.- BlaiseGuard: opt-in BL-1007 DeclarationParentheses.
cp-migrate, the migration analyser, has its first rule (MIG-CALLCONV).- bindgen marks synthesised callback types
cdecl. - CI cross-builds the Windows binaries and runs the fixtures and the self-hosting gate on windows-latest.
scripts/windows-vm.shruns programs, and the self-hosting gate, in a local Windows 11 guest.
Release artefacts
| Archive | Built | Verified |
|---|---|---|
blaise-v0.16.0-macos-arm64.tar.gz |
native stage-2 on macOS | every fixpoint and the full suites on macOS; pdr's suites on macOS |
blaise-v0.16.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; pdr's suites on Debian 12 |
blaise-v0.16.0-freebsd-x86_64.tar.gz |
cross-compiled on macOS | ELF shape and version string, the archive used in a FreeBSD 14.3 VM; pdr's suites there; the master CI freebsd-crosscheck job runs the self-host fixpoint and full suite |
blaise-v0.16.0-windows-x86_64.zip |
cross-compiled on macOS | byte-identical self-build in a Windows 11 guest, and the zip unpacked and used there |
Each archive is self-contained: the binary, blaise.cfg, the RTL and stdlib source and a hello.pas; the macOS, Linux and FreeBSD archives also carry pdr, pdr-dap and LICENSE-pdr.
Fixpoint: 1,467,903 lines of stage-2 arm64 assembly. Tests: 6,022 compiler tests and 689 stdlib tests.