backend: PHP #64
Labels
No labels
loop
queue/failed
queue/queued
ready
status/parked
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
torbscript/language#64
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
A back end that emits PHP; tasks run on an event loop that uses what the host has.
Source
Steps
Split by
docs/design/PHP.md(section 6), as #63 was split. Each step is filed when the one before it is merged.docs/design/PHP.md(#702)linux-php, driver, functions, integers, records,gotoblocks, guards, CI action.forgejo/actions/php(slice 1; #727, PR #730)Closeorder (slice 3; #761)UInt64, manifest walk (slice 4; part A, integers, bits andUInt64: #804, PR #809, merged; part B, lists, list and text natives and manifest walk: #836; part C, the rest of the kernel natives, is filed when #836 is merged)libm,pack/unpack,Float32(slice 5; not filed)stream_select, cancellation (slice 6; not filed).nophpmarkers,torb test --target linux-php, docs (slice 8; not filed)#65 (capability table) and #66 (Composer package) stay separate.
Acceptance criteria
Dependencies
Moved from the planning lists of the docs; the design record stays the specification.
[loop:torbscript] intake: in scope (author orion, label loop), source JAVASCRIPT-AND-PHP.md, not a duplicate. Very large (a new back end); depends on #62 and #52, refine splits it only after those. next: waiting (dependencies #62 and #52) until 2026-10-10T04:00:00Z
[loop:torbscript] refine: re-checked 2026-10-29T19:56Z: still blocked on #62 (PHP version floor, owner decision asked in the TorbScript group today) and #52. Splitting waits until both are settled.
next: waiting (dependencies #62 owner decision and #52)
[loop:torbscript] refine: re-checked 2026-10-30T05:57Z: #62 (PHP version floor) is still an open owner decision (asked 2026-10-29); #52 is closed. The PHP back end is split only once the floor is settled; its design record can follow the JavaScript one (#63, record landed in PR #606).
next: waiting (owner decision #62) until 2026-10-30T08:00:00Z
[loop:torbscript] wait: re-checked 2026-10-30T08:30Z: #62 (PHP floor) is still unanswered; second ask went to the TorbScript group today. The split waits for the answer.
next: waiting (owner decision #62) until 2026-10-31T08:00:00Z
[loop:torbscript] wait: #62 is decided and landed (PR #686 merged: PHP floor 5.6 with a 7.4 fallback). The split of the PHP back end into steps (design record first, as #63 did) is the next refine; no worker slot is free this tick (4 implementers running, 6 open PRs).
next: waiting (worker slot for the refine) until 2026-10-30T13:00:00Z
[loop:torbscript] wait: no worker slot is free this tick (3 slots used: main CI triage #696, refine #72, refine #80). The split of the PHP back end into steps, design record first, is the next refine.
next: waiting (worker slot for the refine) until 2026-10-30T17:38Z
[loop:torbscript] claim refine by session:loop-torbscript-20261030 @anthropic:tkoehn until 2026-10-30T21:31Z
[loop:torbscript] refine: split the PHP back end into 9 steps like #63; step 1 (design record
docs/design/PHP.md) filed as #702 withloop+ready; the record itself is already written and committed on branchloop/702-php-design-record(one commitdocs(design): add the PHP back end design record, not a PR yet, no gates run), so the implementer of #702 only needs to check it and open the PR. #64's body now carries the step list (steps 2 to 9 named, filed just in time). Decided by the loop (full list in #702 and the record): targetlinux-php;gotoper block;is_intoverflow check; byte strings compared only with===/strcmp;pack/unpackwithd,f,V; classes for records, witnesses as arrays of function names; no__destruct; tasks as the IR state machines on a run queue with onestream_selectwait (no Fibers, noext-uv/ext-ev), which amends the "Tasks in PHP" bullet of JAVASCRIPT-AND-PHP.md; CI with PHP 5.6.40, 7.4.33 and 8.4.x. No owner decision needed. Caveat: no PHP on the worker machine, so nothing was measured; the record lists each claim taken from the manual and the slice test that pins it. tokens used ~600knext: waiting (step #702)
[loop:torbscript] wait: step 1 (#702) is in PR #707 (CI pending, argus requested). Step 2 is filed once #707 has merged. next: refine step 2 when #707 has merged.
[loop:torbscript] re-sweep: ticked #702 in the checklist, because this step is closed and landed on main; the checklist now matches the state of its children.
[loop:torbscript] claim refine by session:loop-torbscript-20261113 until 2026-11-13T03:00:00Z
[loop:torbscript] refine: step 2 filed as #727 (loop + ready; meets the definition of ready, one PR in two commits like #678). #62 and #52 are closed; the open items of PHP.md section 8 do not block it and no owner question is needed. Step 2 line of the body links #727, not ticked.
next: implementation of #727
[loop:torbscript] release refine: done
[loop:torbscript] refine: step 3 (slice 2) is filed when step 2 (#727, PR #730) is merged; CI on the PR is running.
next: waiting (step 2 of #64 to merge: #727 / PR #730)
Post-merge check of #730 (merged as
187618a9, closes #727): the PHP back end is on main, but it is in no release yet. No v-tag exists on this repo and project.trb is still version 0.1.0, so the release.yml/images.yml path (v0.MINOR.PATCH tag, then images) has never run. Next step, not done in this turn: a version-bump PR on main (project.trb, compiler/project.trb, editors/vscode/package.json, compiler/src/package/version.trb), reviewer argus, then tag v0.MINOR.PATCH to start release.yml. Verify the first release run end to end before relying on it. Issue #64 stays open until the PHP backend ships in a release.[loop:torbscript] claim refine by session:loop-torbscript-20261113 until 2026-11-13T12:20:00Z
[loop:torbscript] refine: step 2 (#727, PR #730, merged as
187618a9) ticked in the body; step 3 (slice 2 of docs/design/PHP.md: variants, switch, arrays, closures, cells, lazy) filed as #735 withloop+ready: compiler only, one PR with a commit per logical change (no seed-name change, so no two-commit split), models sonnet/high, no owner question. Names the real files on main (compiler/src/backend/php/{body,type,emit,writer}.trb,runtime/php/core.php,tests/conformance/php.allow,php-variants-arrays.trb). Step 3 line of the body links #735, not ticked.\nnext: waiting (step 3 is #735, implement)[loop:torbscript] claim refine by session:loop-torbscript-20261113 until 2026-11-13T22:30:00Z
[loop:torbscript] refine: step 3 (#735, PR #738, merged as
f10e88a6) ticked in the body; step 4 (slice 3 of docs/design/PHP.md: witnesses, trait values, objects, counts andCloseorder) filed as #761 withloop+ready: PHP witness arrays, trait values, shared objects,rc/release andCloseorder mirroring the JavaScript slice 3,MakeUniquedeferred, compiler only, next: implement (#761)[loop:torbscript] release refine: done
[loop:torbscript] wait: step 4 is implemented as #761 (PR #766), CI is red (tier A, gates), a fix round is running, next: waiting (PR #766 to land; then tick step 4 and refine step 5)
[loop:torbscript] data fix (orion/infra#3950): the wait for PR #766 is over. #761 is closed and PR #766 is merged; step 4 is ticked in the body. next: refine step 5 (kernel, part 1: integers, bits, storage, UInt64, manifest walk), filed just in time.
[loop:torbscript] claim refine by session:loop-torbscript-20261114-0644 until 2026-11-15T01:45:00+01:00
[loop:torbscript] refine: step 5 filed as #804 (loop + ready), php: integers, bits and UInt64 (slice 4A of #64). Slice 4 of PHP.md is too big for one PR (integers, UInt64, storage, manifest walk, vectors), so only part A is filed (K1, K2, K4, K7 integer, K8,
int64.php, intrinsic sweep, vector test against the C runtime); part B (storage, manifest walk with deferred list, memory figures) is filed when #804 is merged. Decided by the loop: the split and the vector-test shape (no owner question; no seed touch, no manifest change). Model sonnet/high.next: implement #804
[loop:torbscript] release refine: done
[loop:torbscript] refine: waiting for PR #809 (step 5 part A, #804) to merge; part B (storage, manifest walk) is filed when it is merged. CI on the PR is still running.
next: waiting (PR #809 merge)
[loop:torbscript] recheck: PR #809 (step 5 part A, #804) is merged, so the wait on it is met. Part B (storage, manifest walk) is filed just in time once fewer than 4 issues are ready (about 10 are ready now).
next: waiting (ready buffer below 4, then refine part B)
[loop:torbscript] claim refine by session:loop-torbscript-64-refine until 2026-11-16T14:29:00Z
Reason: PR #809 merged, ready buffer is 2 of 4 (#620, #365), one worker slot free. Refine files step 5 part B (storage, manifest walk) of this epic.
[loop:torbscript] refine: filed step 5 part B as #836 (lists, list and text natives,
MakeUnique, manifest walk withtests/conformance/php.deferred, memory figures), labelsloopandready; no duplicate among the open issues (keyword search: php storage, manifest walk, nativeEntries, ListStorage, pageSize). Decided by the loop: slice 4B of PHP.md is split, because the JavaScript 4B (one issue) held about 45 more kernel natives; part C (rest of the kernel natives, page size, narrowing conversions,Shown values) is filed just in time when #836 is merged, and meanwhile sits on the deferred list as tag4C. The step 5 line of the checklist above now names #804 (merged, PR #809), #836 and part C. Claim released. Worker usage: this refine, about 150k tokens.next: #836 is ready for implementation (sonnet, high).
[loop:torbscript] wait: slice 4B (#836) is in PR #839, conformance for PHP is green after
fc284b41, tier B and Argus review pending. Part C of #64 is filed after #839 lands. next: waiting (PR #839 landing)