js: run a first conformance program under Node (step 2 of #63) #678
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Step 2 of #63 (backend: JavaScript). Step 1 (#602, PR #606) landed
docs/design/JAVASCRIPT-BACKEND.md; its section 6 names this as slice 1 of the implementation: the smallest slice that runs a real program under Node.What
js: run a first conformance program under Node. Add
Architecture.JavaScripttostd/coreandTargetArchitecture.JavaScripttoproject/target.trb, so thatbrowser-jsis aBuildTarget(everyTarget(),targetNamed, the tables ofdocs/tooling/torb-build.md); createcompiler/src/backend/javascript/{emit,body,type,natives,writer}.trbandruntime/javascript/{core,int64}.mjs; emit the constructs of the slice-1 row of section 6 with the dispatch loop (Integer,Boolean,Void, records and tuples,Constant,Move,Copy,Branch,Jump,Return,Panic,TextConcat,PrintParts,ExitWithCode), the text of section 2.5 and theInthelpers of JAVASCRIPT-AND-PHP.md section 2a; maketorb build,torb runandtorb checkaccept the target without--emit-c; addtests/conformance/javascript_first.trbwith its.expectedand.exitfiles,tests/conformance/js.allow,tools/conformance.sh --jsand the CI jobconformance-jsthat installs Node 24.21.0 through.forgejo/actions/node.Seed: touches it by name (a new
Architecturecase and target the build looks up), so expect two commits: the case ofArchitectureand the target first, the back end after; confirm withtools/check-commits.sh.Out of scope: anything in the rows of slices 2 to 8 of section 6, a minifier, a source map,
torb test. No slice adds a native to the kernel.Acceptance criteria
torb build --target browser-jsbuildstests/conformance/javascript_first.trb(integers of every width with an overflow that panics, functions and recursion, a struct,printof text and numbers) and the output runs under Nodejavascript_first.trbpasses on the C, the VM and the JavaScript legs with the same expected filesjs.allowholds it and the existing programs that use only the slice-1 constructsconformance-jswith Node 24.21.0 runstools/conformance.sh --jstorb format --checkandtorb docs checkare greenDependencies
Part of the epic #63; the record
docs/design/JAVASCRIPT-BACKEND.mdsection 6 is the specification.[loop:torbscript] ready: goal, acceptance criteria, design record (JAVASCRIPT-BACKEND.md section 6, slice 1) and seed impact (two commits) stated; one PR. No duplicate (keyword search: only #63 and #602).
[loop:torbscript] claim implement by session:loop-torbscript-20261030 until 2026-10-30T11:15:00Z
[loop:torbscript] release implement: worker failed after 25 min (output overflow, no result); nothing pushed (no branch, no PR). Claim ended. next: respawn next tick with a narrower brief (keep the session output small; slice 1 only).
[loop:torbscript] claim implement by session:loop-torbscript-20261030 @anthropic:theorben until 2026-10-30T12:00:00Z (respawn after a worker failure with no output; nothing was pushed)
orion referenced this issue2026-10-30 06:20:58 +00:00
[loop:torbscript] release implement: PR #679 is open with CI green at head
13657e4a, and Argus is requested as reviewer. It has two commits: the browser-js target, and the emitter with runtime/javascript, the --js conformance mode and the conformance-js job. tests/conformance/javascript_first.trb ran under Node in CI and matched its expected output, including exit 101 and the panic position. Not exercised: torb run --target browser-js. Left for later slices: slices 2 to 8, the minifier, source maps and torb test on browser-js.next: waiting (review of PR #679)
[loop:torbscript] done: PR #679 merged 2026-10-30T07:39Z; slice 1 is on main. Closing.