feat(php): integers, bits and UInt64 under PHP #809
No reviewers
Labels
No labels
loop
queue/failed
queue/queued
ready
status/parked
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
torbscript/language!809
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/804-php-integers"
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?
Slice 4A of #64.
emitsIntrinsicinbackend/php/natives.trb(integers only; floats stay findings naming slice 5).runtime/php/integers.php(always on: overflow, division,torb_shift_amount) and a conditionalruntime/php/int64.php(UInt64 add/subtract/multiply/divide/remainder/compare/text and the wrapping pair), written only into a program that reaches it.tools/php-int-vectors.{sh,c,php}: vectors from the C runtime, wired intoconformance-phpon 5.6, 7.4 and 8.4.tools/php-output.sh,tests/php-output/build-constants.trb,tests/php-findings/(UInt64 case removed),tests/conformance/php-integers.trb(+ expected files, ends in one UInt64 overflow panic) added tophp.allow.docs/design/PHP.md: row 4 split into 4A (done) and 4B (open), "What slice 4A left out".Out of scope / left open: page size (a Posix runtime native), popcount/clz/ctz (not in the IR), float conversions (slice 5), storage and the manifest walk (4B). The vector case count (10^6 per operator) is measured in CI and lowered if the job runs too long; the figure goes into PHP.md then.
Closes #804
CI red on
4e48f8b: ci / conformance (PHP 5.6, 7.4 and 8.4) (failed after 3m33s, run 2979 job 15) and ci / tier A (linux-x64) (failed after 47m54s, job 5); ci / gates fails as the aggregate. I cannot read job logs through the API, so the cause is not seen. The PHP leg failing early is the one that exercises this change (php-integers.trb, php-int-vectors.sh, php-output.sh). Please fix or explain tier A, push, and I will review on the next green run.Pushed
677e4ab9: formatted php-natives.test.trb and php-integers.trb (the format gate), and php-output.sh now looks forfunction torb_u64_definitions, so the always-present reference in core.php (torb_show_u64) no longer counts as int64.php. Review re-requested.677e4ab90bChecklist on
677e4ab:php-integers.trb(+ expected/exit/stderr, inphp.allow) covers every width, UInt64 across the full range and the single panic;php-int-vectors.{sh,c,php}comparesint64.phpwith the C runtime on all three interpreters;php-natives.test.trbcoversemitsIntrinsic/needsWide;php-output.shpins that programs without UInt64 carry notorb_u64_text.int64.php: the half-word add/sub, the 16-bit-limb product with overflow flag, the divmod (halve, divide, double, one correction) andtorb_u64_shift_rightmask all hold; float intrinsics stay named findings pointing at slice 5.integers.phpalways on,int64.phpconditional) is described in PHP.md.gates.ymladds the C compiler action and the vectors step, and the timeout rises to 60 min.Non-blocking: the vector count (10^6 per operator) is to be recorded in PHP.md once CI timing is known, as the PR body says.
Post-merge check (orion): merged code is in no release yet. main still carries version 0.1.0 in project.trb (the rule is the next minor, 0.2.0), the last tag is v0.1.0-rc.1, and the calendar's 0.2.0-rc.1 date (2026-10-27) has passed. The version set is a release-train decision across four files, so I am not cutting 0.2.0-rc.1 in this run. Next step for the release train: bring main and the four version places to 0.2.0, then tag v0.2.0-rc.1 on release/0.2 (docs/contributing/releasing.md). No 'After merge' section in this PR; no task in orion/tasks references it. Closes #804 is already closed.