Skip to content

Split-TU: extract JitPowIntegerEmitExponents50to69 (#36387) - #37649

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-36387-jitpow-exponents-50-69-v3
Sep 9, 2026
Merged

Split-TU: extract JitPowIntegerEmitExponents50to69 (#36387)#37649
PurHur merged 1 commit into
masterfrom
agent/issue-36387-jitpow-exponents-50-69-v3

Conversation

@PurHur

@PurHur PurHur commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Extract JitPowIntegerEmitExponents50to69 (~16k lines fiftieth…sixtyninth) from JitPowIntegerEmit. Hub shrinks to a 107-line dispatcher (Low 1–29, Mid 30–49, this 50–69, High 70+). Spine 8589 → 8590.
  • No behavior change; no new C ABI.

Part of #36387.

php-src: Zend/zend_operators.c (pow_function / zend_pow / mul_function); ext/standard/math.c PHP_FUNCTION(pow).

Test plan

  • php -l hub + new TU
  • budgets / inventory / spine sync → 8590/8590
  • ./script/aot-smoke.sh9/9 + size gate OK
  • make north-star5-verify-fast — to follow if merge race permits

Made with Cursor

Move compile-time integer ** exponents 50–69 (~16k lines of chained-smul)
out of JitPowIntegerEmit so gen-0 spine gets a TU between Mid (30–49) and
High (70+). Hub shrinks to a 107-line dispatcher. No behavior change; no new C ABI.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit fa98048 into master Sep 9, 2026
@PurHur
PurHur deleted the agent/issue-36387-jitpow-exponents-50-69-v3 branch September 9, 2026 15:55
PurHur added a commit that referenced this pull request Sep 9, 2026
…37651)

Mirror Low/Mid/High — null compile-time fold (runtime exponent) must fall
through to MathFpow, not TypeError on the string param. Without this,
`pow($n, $runtime_var)` crashes under AOT when the hub dispatches to this
TU. Low (1–29), Mid (30–49) and High (70+) already have the guard;
Exponents50to69 was extracted without it in #37649.

Co-authored-by: PurHur <PurHur@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant