Commit Graph
36 Commits
Author SHA1 Message Date
Chris Tate 2967a1b8c0 Propagate exceptions by unwinding from directly called functions on Linux
Emitted functions report an exception by returning with the thread's
pending flag set, and every caller tests the flag after each call that
may throw. On Linux executables (glibc and musl), functions reached only
by direct calls now propagate exceptions by unwinding the native stack
instead:

- unwindAbiFunctions selects the may-throw functions that are not async
  or generators, constructors, virtually called or overridden methods,
  closure targets, the entry, library exports, module initializers or
  callees of coroutine bodies.
- A native unwind costs about 2 µs a raise and 0.1 µs a frame, so functions that
  exceptions are likely to cross keep the flag: those with a `throw` of
  their own, those up to three calls above one, and recursive functions,
  counting calls through methods, closures and callbacks.
- Their propagating exits call scr_unwind_raise (scr_unwind.c), a forced
  unwind through _Unwind_ForcedUnwind with the exception still in the
  active cell.
- Direct calls to them are `invoke`s without a pending check. The
  landing pad runs the frame's usual unwind path: it releases the frame's
  values and then enters the enclosing try handler or resumes the unwind.
- Remaining plain calls to them (wrappers, adapters, runtime-facing entry
  points) become invokes whose landing pad continues on the pending flag,
  or resumes when the wrapper is itself invoked. Every other call is
  marked `nounwind`, so inlining a raising function at an invoke keeps its
  calls plain.
- When emitted text breaks these rules (a raising function's address is
  taken, or an invoked function returns with the flag pending), the
  module is emitted again with those functions on the pending flag.

Emitted code does not declare scr_unwind_raise `noreturn`, so sanitized
builds do not run the sanitizer's no-return hook, which needs stack
bounds that fiber stacks do not report. Instead, scr_unwind_raise clears
the shadow of the frames it unwinds.

Executables link a static unwinder: libgcc_eh with the host toolchain and
the glibc runtime packs, and Zig's libunwind with Zig and the musl packs.
macOS, Windows, Android, WASI, libraries and debug builds keep the
pending flag everywhere and emit the same code as before.

The throw-chains runtime workload measures exceptions caught 2, 5 and 20
recursive calls above the throw, through direct calls and a callback,
and a parser that backtracks by throwing.
2026-10-24 11:03:34 -05:00
Chris Tate 7784800c8e Prepare v0.4.4 release 2026-10-23 20:51:00 -05:00
Chris Tate 849fad0ab6 Prepare v0.4.3 release 2026-10-23 12:08:08 -05:00
Chris Tate 9aaebbab25 Prepare v0.4.2 release 2026-10-22 11:14:27 -05:00
Chris Tate 3cc72ac96c Prepare v0.4.1 release 2026-10-21 09:51:40 -05:00
Chris Tate 282e4820d2 v0.4.0 2026-10-20 16:10:37 -05:00
Chris Tate 3032248c11 v0.3.6 2026-10-17 13:47:41 -05:00
Chris Tate de08ab1920 v0.3.5 2026-10-16 10:33:14 -05:00
Chris Tate bf050d1077 v0.3.4 2026-10-16 01:29:54 -05:00
Chris Tate 2f8aea3279 v0.3.3 2026-10-15 11:23:16 -05:00
Chris Tate 6cc88fbf11 v0.3.2 2026-10-14 09:22:56 -05:00
Chris Tate 733ab38a0c v0.3.1 2026-10-13 13:26:10 -05:00
Chris Tate ef25cf119d Prepare v0.3.0 2026-10-12 15:57:06 -05:00
Chris Tate d75d7a22f0 Prepare v0.2.10 2026-10-12 10:31:02 -05:00
Chris Tate fa11424e5f Prepare v0.2.9 2026-10-11 17:25:14 -05:00
Chris Tate c67e08a9cf Prepare v0.2.8
- Synchronize published packages and the compiler surface manifest at v0.2.8, and bump the runtime ABI marker to v9.
- Add release notes for worker graph sharing, catchable deep recursion, parallel code generation, runtime performance, and compatibility fixes.
2026-10-10 10:08:39 -05:00
Chris Tate 9131a3498c Release v0.2.7
- Synchronize all published packages and the compiler surface manifest at v0.2.7.
- Record native features, runtime performance improvements, and compatibility fixes since v0.2.6; leave Unreleased empty.
- Verify version and manifest contracts, compatibility output, and cross-target library conformance locally; use CI for full validation.
2026-10-08 21:18:31 -05:00
Chris Tate b9bac85441 Release v0.2.6 (#729)
- Release native workers, shared memory, and broader language and library support.
- Include runtime and compiler improvements in the release notes.
- Synchronize all published packages and the surface manifest at 0.2.6.
2026-10-07 19:15:55 -05:00
Chris Tate 11c9821296 Release v0.2.5
- Synchronize compiler, runtime, and native package versions.
- Publish release notes and the updated surface manifest.
2026-10-06 15:06:04 -05:00
Chris Tate c08ab955ae Enforce linting and consistent source formatting
- Enforce oxlint and oxfmt for owned JavaScript and TypeScript with independent CI checks.
- Preserve compiler import boundaries and protected fixtures while cleaning up lint findings.
- Standardize source formatting and validate import, fixture, and embedded-source protections.
2026-10-05 17:51:24 -05:00
Chris Tate b1c11aac19 Release v0.2.4 (#689)
- Bump all published packages to 0.2.4.

- Document collection, performance, and Windows toolchain updates.

- Regenerate the versioned compiler surface manifest.
2026-10-05 12:20:42 -05:00
Chris Tate 7c064e7338 chore: prepare v0.2.3 (#674)
- Add v0.2.3 release notes and marked release body.

- Bump CLI, compiler, runtime, and platform package versions.

- Regenerate the compiler surface manifest.
2026-10-04 19:47:17 -05:00
Chris Tate ad866f82b2 chore: prepare v0.2.2 (#638) 2026-10-03 13:57:35 -05:00
vercel-labs[bot] 8f50d977a8 chore: prepare v0.2.1 (#604)
Co-authored-by: vercel-labs[bot] <330486464+vercel-labs[bot]@users.noreply.github.com>
2026-10-01 18:00:41 -05:00
Chris Tate 51ca803c16 chore: prepare v0.2.0 (#593)
- Synchronize published compiler, runtime, and native platform packages at 0.2.0.
- Document the native CLI, LLVM migration, and compatibility and performance improvements.
- Keep release version checks scoped to published packages.
2026-09-30 16:15:10 -05:00
Chris Tate 3f66c8e20b Make LLVM the sole production backend
- Remove C emission, debugging options, and automatic backend fallback.
- Complete LLVM lowering and native bootstrap coverage across supported targets.
- Link executables and libraries with precompiled C runtime packs, including iOS and Android.
2026-09-29 20:54:09 -05:00
Chris Tate 8094372ca5 chore(release): prepare v0.1.7 (#489)
- Record v0.1.7 highlights and align the published package versions.
- Regenerate the compiler surface manifest for the release.
2026-09-27 10:40:41 -05:00
Chris Tate 6d279ceb4d chore(release): prepare v0.1.6 (#466)
- Align all published package versions and the surface manifest at 0.1.6.

- Record the static Array, Object, and String updates in the changelog.

- Summarize the runtime memory and terminal performance improvements.
2026-09-26 10:12:12 -05:00
Chris Tate 97343c7478 chore(release): prepare v0.1.5 (#453)
- Bump published packages and the surface manifest to 0.1.5.

- Summarize the HTTP, numeric, and npm-static updates in the changelog.

- Verify cross-target library conformance.
2026-09-25 20:50:34 -05:00
Chris Tate af3f357f74 chore(release): prepare v0.1.4 (#390)
* chore(release): prepare v0.1.4

- Bump the CLI, compiler, runtime, and platform packages to 0.1.4.
- Add v0.1.4 release notes and regenerate the static surface manifest.

* test: keep upgrade fairness client open through timer check

- Keep upgraded clients connected through the fairness timer check under CI load.
- Fail the driver clearly if its watchdog expires.

* test: record fork dispatch TS7 baseline

- Record the new fork dispatch corpus entry in the TS7 order canary.
- Pin its single-module evaluation order and empty preflight diagnostics.

* fix(runtime): complete fork IPC shutdown before close

- Release the IPC writer listener when the remote channel closes after writes finish.

- Deliver disconnect before close for forked children with active IPC listeners.
2026-09-23 13:44:41 -05:00
Chris TateandCruel f5ed014cc7 Preserve glibc 2.36 runtime compatibility (#365)
- Pin GNU runtime packs to glibc 2.36 Zig targets and reject incompatible imports.

- Provision verified Zig builds and exercise published artifacts on Debian Bookworm.

Fixes #349

Co-authored-by: Cruel <383999+Cruel@users.noreply.github.com>
2026-09-20 22:36:10 -05:00
Chris Tate 3d1286cdea chore(release): prepare v0.1.3 (#347) 2026-09-18 08:37:22 -05:00
Chris Tate 875c20b143 chore(release): prepare v0.1.2 (#333)
- Sync the CLI, compiler, runtime, and platform package version spine.
- Regenerate the compiler surface manifest for v0.1.2.
- Add the v0.1.2 changelog entry and release markers.
2026-09-15 23:18:23 -05:00
Chris Tate ce8419781e chore(release): prepare v0.1.1 (#307) 2026-09-13 20:09:18 -05:00
Chris Tate e640b4b2ff chore(release): prepare v0.0.37 (#298) 2026-09-13 00:21:54 -05:00
Chris Tate c41f1a8be9 Expand LLVM native output targets (#280)
* Expand LLVM native output targets

- Add owned helper and runtime-pack contracts for macOS x64, Linux glibc/musl, Windows x64, and WASI.
- Generalize LLVM target selection, package validation, linker plans, and release/CI matrices.
- Document linker boundaries and add focused native-output and runtime-pack coverage.

* Pin Windows LLVM helper CI to VS 2022

The official LLVM archive needs the Visual Studio 2022 CMake generator, which is not guaranteed by windows-latest.

* Align bootstrap cache with LLVM runtime-pack builds

Use the same target-specific helper and linker identity before and after compiler loading so routed executable cache hits remain lightweight.

* Install Windows LLVM CI tools with Chocolatey

windows-2022 includes Visual Studio but not winget; use its available Chocolatey bootstrap for CMake and Ninja.

* Prevent Zig version probes from leaving runtime-pack objects

Run runtime-pack compiler version probes in a private temporary directory and remove the accidental tracked WASI a.o file.

* Use 7-Zip for Windows LLVM setup

Extract the official LLVM development archive with two-stage 7-Zip instead of Windows tar.exe, which timed out while materializing the toolchain tree.

* Define ssize_t for the MSVC runtime pack

Clang's MSVC target does not expose POSIX ssize_t through sys/types.h; define the pointer-sized runtime type without affecting MinGW.

* Build the Windows runtime pack with Zig

Use the MinGW-compatible Windows sysroot required by the runtime while retaining COFF helper output and installing Zig in the Windows native CI lane.

* Give macOS LLVM differential shard time to finish

Shard 1 passed its setup and focused contracts but was cancelled during its cold LLVM differential slice at the 20-minute job limit.
2026-09-01 13:41:34 -05:00