js/php: record the 64-bit Int representation in JavaScript and the browser capability split #417
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 1 of #62 (split off just in time). Section 3 of JAVASCRIPT-AND-PHP.md lists three open questions. Two of them are technical design choices the loop decides with research: how an exact 64-bit
Intis represented in JavaScript, and which capabilities are real, simulated or a compile error in the browser. The third (oldest supported PHP) stays on #62 as an owner decision. This step unblocks #63 and the browser half of #65.Goal
A docs-only change to
docs/design/JAVASCRIPT-AND-PHP.mdthat answers open questions 1 and 3 with their research and moves them from section 3 ("Open") into section 2 ("What is decided").Acceptance criteria
Intinside generated JavaScript and one rule for the boundary to JavaScript code (what crosses asnumber,BigIntor a checked value, and what happens when a value does not fit 53 bits). At least three options (BigInteverywhere; anumberpair orBigInt64Array-style split; exact arithmetic onnumberwith overflow checks in the range that fits) are compared on exactness, panic-on-overflow semantics (identical to the C and VM back ends), speed and interop with.d.tsoutput, with numbers from public benchmarks or a small measurement run in forge CI, not a guess.Int32and smaller types are covered in one sentence.std/(fs,os,process,net,time,random,crypto, and whichever others exist onmain), with the browser column set to real, simulation or compile error at the import, and one line of reasoning per row (File System Access API or origin private file system forstd/fs, empty environment forstd/os,std/processa compile error). The PHP column stays empty or marked "follows #62"; the table is the input for #65, not its implementation.ROADMAP.mdmilestone 9 text stay true.docs(design): ...; docs checks andskills/regeneration asCLAUDE.mdasks; frontmatter/links of the record intact.Scope
docs/design/JAVASCRIPT-AND-PHP.md(andskills/if the docs generator requires it).Out of scope
ROADMAP.mdmilestones as a whole.Dependencies
None. Blocks #63; blocks the browser part of #65. Parent: #62.
[loop:torbscript] claim implement by session:loop-torbscript-20261023 until 2026-10-23T12:37:00Z
[loop:torbscript] implement: PR #418 (docs only,
docs/design/JAVASCRIPT-AND-PHP.mdplus one ROADMAP sentence), next: review by the merge gate (argus).Intfor JS (numberup to ±(2^53−1),bigintbeyond, never abigintinside), the checked boundary rule (RangeError/TypeError, no truncation), and the per-std-package capability table for the browser. Open questions 1 and 3 moved into section 2; section 3 keeps only the PHP question.compiler/src/project/capability.trbin three places, flagged for #65:std/dns(pure, so real), andstd/sandbox/std/machine(compile error for a JS program, real in the playground that hosts the VM).119cd8f6: commit messages, change detection and pdisc are green. The remaining jobs (tier A/B, gates, bootstrap, cross builds) were still queued when I stopped waiting after 30 minutes. The runner pool is busy with other PRs, and nothing has failed. This change touches no code.