Blaise v0.14.0 is here 🎉 - macOS, BlaiseGuard, math and more... #211
graemeg
announced in
Announcements
Replies: 2 comments
|
Regular expressions? That's great news! |
0 replies
|
Thank you Graeme for all your amazing skilful work and for your persistence! Blaise is quickly becoming a crown jewel in the Wirth universe... |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This has been our biggest cycle yet — 415 commits since v0.13.0 — and the
headline is simple: Blaise now has a working native ARM64 backend for
macOS. We are not done with the macOS port (there's still real work ahead
on the debugger side and broader on-device coverage), but the compiler
itself can already generate, assemble, link and code-sign Mach-O binaries
for Apple Silicon, and it can cross-compile a growing slice of its own
source onto that target. Progress is real and it's landing steadily.
Alongside that, this cycle brought operator overloading, compile-time file
embedding, a brand-new static analyser, and a long list of hardening fixes
across both backends. Full details are in the changelog.
🍎 macOS ARM64 — from zero to self-cross-compiling
The bulk of this cycle's work (over 150 commits) went into building a
complete ARM64/macOS backend from the ground up:
LC_UUID, and ad-hoc code signing.toolchain to produce object code.
compiler's own feature surface (generics, interfaces, jumbo sets, closures)
to compile increasingly large slices of Blaise's own source.
On-device bring-up has already reached the point where hello-world,
class-based programs, and even the compiler's own TestRunner run on real
Apple Silicon hardware, with the majority of the suite reaching a clean
summary. There's more to do — full debugger (OPDF) support on arm64 and
broader e2e coverage are next — but the foundation is solid and the pace of
fixes has been fast.
🛡️ BlaiseGuard — a new static analyser, built on your compiler
This cycle also introduced BlaiseGuard, a static analyser purpose-built
for the Blaise dialect. It reuses the compiler's own lexer, parser and AST —
so it always understands exactly the grammar your compiler accepts, with no
vendored copy to drift out of sync.
It already ships rule families for unused identifiers, reference cycles,
risky string indexing, duplicate detection, and several classes of defect
the compiler itself silently accepts today, plus project-level configuration
and inline suppression comments to keep false positives low.
BlaiseGuard isn't bundled in the release tarball yet — it's evolving fast,
so for now build it straight from source:
For a more in-depth look, see here.
✨ Language: operator overloading and compile-time embedding
Operator overloading landed end-to-end this cycle — parse, resolve, and
lower:
Compile-time file embedding also arrived, via
{$EMBED}(byte array) and{$EMBEDSTR}(string):Other language wins: subranges of enumerated types now work as expected
(
TWeekday = Mon..Fri),Booleanis accepted as an array index type, and avarargsdirective lets you bind C-variadic external functions.🔧 Toolchain: leaner linking, no more archive
The link model got smarter: Blaise now defaults to a freestanding,
libc-free binary and only pulls in dynamic linking and libc when your code
actually asks for it (an
externalbinding, a bare libc symbol).--staticand
--dynamicremain available to force either mode explicitly.We also removed the
blaise_rtl.aarchive and its build machineryentirely — the compiler now source-builds the runtime on demand, cached
per target, so there's nothing to install or keep in sync before a build.
🧮 A pure-Pascal libm — no more
libmlink dependencyBlaise binaries no longer link
libm, because there's no longer anything inlibmleft to call. We ported the transcendental math functions Blaiseuses —
Sin,Cos,Tan,Exp,Ln,Power,Sqrtand friends —straight from musl libc's fdlibm-derived math sources into pure Pascal,
living entirely in the RTL:
Every backend — QBE, native x86-64, and native arm64 — now lowers straight
to these RTL routines, so results are bit-identical across Linux, FreeBSD
and macOS, and accuracy is pinned at ~1 ulp against roughly 190 glibc
reference vectors. It also means
--staticfreestanding binaries can nowuse
Powerand friends for the first time — there was no way to staticallylink
libmbefore this.📚 Standard library
stdlibgrew a backtracking regular-expression engine (Text.Regex),.From([...])constructors for lists, sets and dictionaries, aTUuidvalue type, and
AssertRaises/AssertNotRaisesin the testing framework —alongside a steady stream of collection correctness fixes.
🐛 Hardening
A large share of this cycle's commits were bug fixes — many surfaced by the
arm64 self-cross-compile push, which exercised code paths the QBE-only test
harness had never touched. ARC correctness (static arrays of managed
fields, interface pointee reads/writes, unit-global finalisation), jumbo-set
element access, nested-procedure variable capture, and field-array l-value
handling each got a dedicated fix cluster across both backends. Ten GitHub
issues were closed this cycle: #160, #180, #182, #187, #188, #189, #191,
#195, #196, and #208. As well has over 40 bug fixes from my private
collection. :)
⚡ Performance
The native backend picked up register promotion, loop rotation, and a
ported inliner, plus the stack-machine expression idiom was eliminated from
the x86-64 emitter in favour of direct register allocation.
By the numbers
byte-identical, alongside green native, internal-assembler and
warm-cache fixpoints
Try it
Grab the self-contained Linux or FreeBSD tarball from the
GitHub Releases page
— each bundles the RTL and stdlib source plus a ready-to-go config, so
./blaise --source hello.pas --output hellojust works straight out of thearchive.
See the full changelog for the complete technical
rundown.
Donations
If you enjoy following this project, consider donating via Github or Patreon - all donations received goes straight
to my sports carinto the development and upkeep of this project. 😉Onwards to v0.15! 🙌
Built with ❤️ for the Pascal community.
All reactions