Commit Graph
3992 Commits
Author SHA1 Message Date
Malte UblandClaude Opus 5.5 5a673f3919 Merge the macOS island fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:50:44 -07:00
Malte UblandClaude Opus 5.5 d93f457042 Merge the macOS island fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:50:44 -07:00
Malte UblandClaude Opus 5.5 4c9cfc1cc4 Run the deferral test's terminal case under macOS's script(1)
BSD script takes the command after the transcript file, needs a stdin
that is not a socket, and echoes the EOF it forwards from /dev/null.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:50:43 -07:00
Malte UblandClaude Opus 5.5 bdd447ebb6 Merge the macOS island fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:50:43 -07:00
Malte Ubl 93283b5964 Merge the macOS island fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	packages/runtime/src/scr_node_island.c
2026-10-26 12:50:43 -07:00
Malte UblandClaude Opus 5.5 0b7e62dd9c Merge the macOS island fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:50:42 -07:00
Malte UblandClaude Opus 5.5 604e471bc8 Merge the macOS island fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:50:42 -07:00
Malte UblandClaude Opus 5.5 1ec20be530 Merge the macOS island fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:50:42 -07:00
Malte UblandClaude Opus 5.5 7635d0b4fb Merge the macOS island fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:50:41 -07:00
Malte UblandClaude Opus 5.5 ae7d4ebf0d Merge the macOS island fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:50:41 -07:00
Malte UblandClaude Opus 5.5 704e6b4992 Merge the macOS island fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:50:41 -07:00
Malte UblandClaude Opus 5.5 bfbbd349a3 Merge the macOS island fixes, and make nested entries' contexts the same way
A nested entry below the mark makes its context with ni_make_context,
so macOS clears only the top slice of the range instead of the whole of
Node's stack below the mark on every nested call (17 ms per call, and
the cross-heap GC test ran past its timeout).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:50:40 -07:00
Malte UblandClaude Opus 5.5 50385349d3 Merge the macOS island fixes of ni/13-libnode-packs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:50:39 -07:00
Malte UblandClaude Opus 5.5 5f3e97998d Merge the macOS island fixes of ni/1-libnode-loader
The libnode-linux action becomes .github/actions/libnode, which serves
the Linux x64 and macOS lanes: the libnode-packs cache for the runner's
platform, else the development pack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:50:39 -07:00
Malte UblandClaude Opus 5.5 df869f28b0 Run Node islands on macOS, and test them in the macOS CI lanes
macOS binds libnode's own calls to v8::base::Stack inside libnode, so the
bridge's definitions cannot give V8 Node's stack as they do on Linux; V8
took the main thread's stack start and its conservative scan faulted in
the gap above Node's stack. While Node starts on its stack, the main
thread's pthread record now names that stack, which V8 reads once and
keeps.

macOS's makecontext clears the whole stack it is given, so it gets only
the top slice of Node's stack (no 64 MiB pass per context).

CI: dev-pack.json pins mirrored darwin-arm64 and darwin-x64 libnode
builds of the pinned Node 24.22.0 from the libnode-packs workflow, the
dev-pack action serves either platform, and the macOS lanes provision it,
so island tests fail rather than skip on macOS CI. The arm64 LLVM job
runs the island harness; the Intel job runs it and the island corpus.
bridge-smoke loads the .dylib bridge on macOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:50:38 -07:00
Malte Ubl cc091bac48 Merge remote-tracking branch 'origin/ni/i10-js-island-requires' into HEAD 2026-10-26 11:32:11 -07:00
Malte Ubl 6c89aa2644 Merge remote-tracking branch 'origin/ni/i9-recorded-deferral' into HEAD 2026-10-26 11:31:50 -07:00
Malte Ubl 8d1e505850 Merge remote-tracking branch 'origin/ni/i8-exit' into HEAD
# Conflicts:
#	tests/harness/llvm-differential.test.ts
2026-10-26 11:30:16 -07:00
Malte Ubl 240d552d82 Merge remote-tracking branch 'origin/ni/i7-routing' into HEAD 2026-10-26 11:29:33 -07:00
Malte Ubl b2fc8c1cd8 Merge remote-tracking branch 'origin/ni/i6-subclasses' into HEAD 2026-10-26 11:28:52 -07:00
Malte Ubl 8b370de223 Merge remote-tracking branch 'origin/ni/i5-shared-modules' into HEAD
# Conflicts:
#	packages/compiler/ambient/scriptc-node-fallback.d.ts
#	packages/compiler/src/frontend/lowering/lower-classes.ts
#	packages/compiler/src/frontend/lowering/lower-modules.ts
#	tests/harness/npm.test.ts
2026-10-26 11:28:01 -07:00
Malte Ubl 01a87c968a Merge remote-tracking branch 'origin/ni/i4-deferred' into HEAD
# Conflicts:
#	packages/compiler/src/frontend/lowering/lower-modules.ts
2026-10-26 11:27:04 -07:00
Malte Ubl a8067be282 Merge remote-tracking branch 'origin/ni/i3-exports' into HEAD 2026-10-26 11:26:23 -07:00
Malte Ubl 0d054133ad Merge remote-tracking branch 'origin/ni/i2-handles' into HEAD
# Conflicts:
#	packages/compiler/src/frontend/lowering/lower-classes.ts
2026-10-26 11:25:53 -07:00
Malte Ubl 3a5aab5b2f Merge remote-tracking branch 'origin/ni/i1-stack-bound' into HEAD
# Conflicts:
#	packages/compiler/src/cli/command.ts
#	packages/compiler/src/executable/executable-cache.ts
#	packages/compiler/src/frontend/lowering/builtins/module-resolution.ts
#	packages/compiler/src/frontend/lowering/lowerer.ts
#	packages/compiler/src/index.ts
#	packages/runtime/src/scr_json.c
#	tests/harness/npm.test.ts
2026-10-26 11:22:14 -07:00
Malte Ubl f5b1e5f007 Merge remote-tracking branch 'origin/ni/islands-base' into HEAD
# Conflicts:
#	packages/compiler/src/diagnostics/diagnostic.ts
#	packages/compiler/src/node-islands/libnode-pack.ts
#	packages/libnode-darwin-arm64/package.json
#	packages/libnode-darwin-x64/package.json
#	packages/libnode-linux-arm64-gnu/package.json
#	packages/libnode-linux-x64-gnu/package.json
#	packages/node/package.json
2026-10-26 11:20:55 -07:00
Malte Ubl ae66edf566 Merge remote-tracking branch 'origin/ni/3-hosted-loop' into HEAD
# Conflicts:
#	packages/cli/src/bootstrap.ts
#	packages/compiler/src/diagnostics/diagnostic.ts
#	packages/compiler/src/node-islands/libnode.ts
2026-10-26 11:17:30 -07:00
Malte Ubl 141279b74c Merge remote-tracking branch 'origin/ni/1-libnode-loader' into ni/13-libnode-packs 2026-10-26 11:15:43 -07:00
Malte Ubl c088613033 Merge remote-tracking branch 'origin/ni/1-libnode-loader' into ni/3-hosted-loop 2026-10-26 11:15:41 -07:00
Malte Ubl 5817be4d0f Merge remote-tracking branch 'origin/main' into ni/1-libnode-loader
# Conflicts:
#	packages/compiler/src/diagnostics/diagnostic.ts
#	packages/compiler/src/ir/function-references.test.ts
2026-10-26 11:08:44 -07:00
Chris Tate 34c2f9851d Have the native CLI packages depend on their LLVM helper and runtime pack (#2333) 2026-10-26 11:47:34 -05:00
Chris Tate de6cdf1156 Add the shape overlay: typed JavaScript from analysis-proven facts (opt-in) (#2176) 2026-10-26 11:33:47 -05:00
Chris Tate a5971450ec Tear down self-recursive records and classes in one loop (#2343) 2026-10-26 11:14:35 -05:00
Chris Tate fbd82745e3 Merge the island stack base 2026-10-26 10:58:36 -05:00
Chris Tate 09a73ab6ed Fix Array.prototype calls on native arrays, typeof on ambient names, and net connections to Unix sockets (#2326) 2026-10-26 10:56:58 -05:00
Chris Tate 6e4fdf95d0 Link the exported bootstrap package's helper and runtime pack dependencies
The native bootstrap's package checks copy the seed's distribution into a
package directory outside the workspace and, since the CLI packages depend
on their LLVM helper and runtime pack, drop the bundled copies. Nothing in
that directory resolved @scriptc/llvm-linux-x64-gnu, so
verify-native-cli.mjs failed with 'Cannot find module'. The test now links
both packages into the directory's node_modules, as pnpm links a workspace
package's dependencies.
2026-10-26 10:56:27 -05:00
Chris Tate d5dc896576 Merge main 2026-10-26 10:53:46 -05:00
Chris Tate 9b96314c20 Tear down self-recursive records and classes in one loop
The teardown of a type with children of its own type called itself for
each child: a call, its register saves and the segment bookkeeping per
node, 45 instructions per node in a binary tree.

A record or standalone class whose every reference field holds its own
type and that has no collector header now tears down in one loop. A child
whose last reference the dead node held goes onto a pending list linked
through its own count word, which it no longer needs, and the loop takes
the list's first node next, so nodes are visited parent first. Each node
frees its block as before (dispose observers, the RC audit, blocks of
other arenas), the calling thread's blocks go into the teardown segment
in visit order, and the segment goes onto the free list in one step, so a
structure built parent first takes the blocks in its allocation order.
Shared and immortal children keep their release. The loop needs no depth
budget. Other teardowns keep the recursive form.
2026-10-26 10:42:41 -05:00
Chris Tate 928c30e908 Bind thisArg in the array callback methods of dynamic arrays
forEach, map, filter, some, every, find, findIndex, findLast,
findLastIndex and flatMap on a dynamic array, and through
Array.prototype.<method>.call on a native array, called the callback
without its thisArg, so `this` in the callback was not the second
argument. These methods now bind `this` to the thisArg, or undefined
when there is none, once per call, around all of the method's callbacks.
2026-10-26 10:19:57 -05:00
Chris Tate 0b12340ead Merge the libnode loader and mark e04 as a race 2026-10-26 10:18:44 -05:00
Chris Tate 5a14c0a3dc Merge main 2026-10-26 08:37:13 -05:00
Chris Tate 52a228d0f5 Keep declarations a removed branch shares with another 2026-10-26 07:50:59 -05:00
Chris Tate d1a0bea84e Have the native CLI packages depend on their LLVM helper and runtime pack
Each @scriptc/cli-<platform> package bundled its platform's LLVM helper
and runtime pack, which are also published as @scriptc/llvm-<platform> and
@scriptc/runtime-<platform>. The CLI packages now depend on those packages
at the same version (workspace:*, which pnpm pack writes as the exact
version) and leave them out: cli-linux-x64-gnu goes from 115 MB to 60 MB
packed.

- build-native-cli.mts --platform-packages, which each CLI package's
  build:native passes, writes a manifest without llvm_package, runtime_pack
  and runtime_packs.
- loadNativeToolchain resolves a missing helper or host runtime pack as
  Node resolves the package from the compiler's directory: nested in the
  platform package, beside it (hoisted, or pnpm's virtual store) or higher
  up. It requires the compiler's version, and an absent or mismatched
  package fails with an error that names it.
- installNativeCli records where the package manager put both packages in
  the installed manifest, with the same checks.
- verify-native-cli.mjs requires the exact dependencies of a platform
  package and checks the resolved packages' versions.
- package-native-cli.mjs bundles the helper and runtime pack into the
  standalone archives, which stay self-contained.
- smoke-native-install.mjs installs the helper and runtime pack tarballs
  with the platform package; the bootstrap's exported package drops its
  bundled copies first.
- release.yml publishes the CLI packages only once every helper and
  runtime pack package resolves on npm, and scriptc only once the CLI
  packages resolve, each wait at most 25 minutes. A rerun skips the
  uploads npm already accepted and waits again.
2026-10-26 07:48:11 -05:00
Malte Ubl 3bfe3f7c85 Merge base branch 2026-10-26 05:35:29 -07:00
Malte Ubl 44729131df Merge base branch 2026-10-26 05:35:27 -07:00
Malte Ubl 55b20ab200 Merge base branch 2026-10-26 05:35:23 -07:00
Malte Ubl 80b5fdeb54 Merge base branch 2026-10-26 05:35:21 -07:00
Malte Ubl ffff3bfc19 Merge base branch
# Conflicts:
#	tests/harness/node-island.test.ts
2026-10-26 05:35:15 -07:00
Malte Ubl bcef522b73 Merge base branch 2026-10-26 05:34:58 -07:00
Malte Ubl f2fe256f45 Merge base branch 2026-10-26 05:34:57 -07:00