Skip to content

WIP: ob read API AOT prep — array_pop fix + lazy stack link (#4914) - #17116

Closed
PurHur wants to merge 1 commit into
masterfrom
agent/issue-4914-ob-read-api-aot
Closed

PurHur wants to merge 1 commit into
masterfrom
agent/issue-4914-ob-read-api-aot

Conversation

@PurHur

@PurHur PurHur commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

Partial progress toward #4914 (JIT/AOT lowering for ob_get_contents / ob_get_length / ob_end_clean).

Blocker (AOT user-script)

JIT is already green. AOT bin/compile.php (sets PHP_COMPILER_AOT_USER_SCRIPT=1) still fails:

  • Link: read/discard __phpc_ob_* symbols undefined — ObOutputUserScriptLlvm only emits echo bridges.
  • Full stack nested JIT: ObOutputJitBridge::implementObStack module-verify fails on STDOUT stream filter during inline helper compile.

Investigation notes on the issue: #4914 (comment)

Verification

# JIT (green)
HARNESS_DOCKER_RUN_OPTS='--memory=8g --cpus=2' ./script/docker-exec.sh -- bash -lc \
  'source script/php-env.sh && php bin/jit.php -r "ob_start(); echo \"hello\"; \$c=ob_get_contents(); \$l=ob_get_length(); ob_end_clean(); echo \$c,\$l,ob_get_level(),\"\\n\";"'
# hello50

# AOT (still red — link)
HARNESS_DOCKER_RUN_OPTS='--memory=8g --cpus=2' ./script/docker-exec.sh -- bash -lc \
  'source script/php-env.sh && vendor/bin/phpunit --filter ob_get_contents'

Refs #4914 — not ready to merge until AOT fixture test/fixtures/aot/cases/ob_get_contents.phpt passes.

Made with Cursor

Replace array_pop() in ObOutputJitHelper with manual popStackTop() so nested
JIT can compile the full PHP ob stack without HashTable::popLast() misroute.

Wire ob_get_contents/ob_get_length/ob_end_clean/ob_get_level JIT lowering to
ObOutputRuntime::ensureObStackLinked() like ob_get_clean already does.

AOT user-script read APIs still need exec-capture LLVM bridges or a prelinked
ObOutputJitHelper unit — see issue #4914 comment.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur

PurHur commented Jul 15, 2026

Copy link
Copy Markdown
Owner Author

Closing stale WIP: #4914 was merged via #17653 (2026-07-10). JIT/AOT ob_get_contents path is on master; this branch is superseded.

@PurHur PurHur closed this Jul 15, 2026
@PurHur
PurHur deleted the agent/issue-4914-ob-read-api-aot branch July 17, 2026 13:29
@PurHur

PurHur commented Jul 17, 2026

Copy link
Copy Markdown
Owner Author

Cleanup (2026-07-17)

Deleted stale remote branch agent/issue-4914-ob-read-api-aot (tip 2026-07-07, issue #4914 closed, this PR closed unmerged, no open PR). Abandoned WIP not referenced by any open issue.

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