Skip to content

Stdlib: JIT/AOT extract() and compact() (#476)#486

Merged
PurHur merged 1 commit into
masterfrom
agent/stdlib-extract-compact
May 22, 2026
Merged

Stdlib: JIT/AOT extract() and compact() (#476)#486
PurHur merged 1 commit into
masterfrom
agent/stdlib-extract-compact

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 22, 2026

Summary

  • Add lib/JIT/ScopeBuiltinHelper.php with LLVM lowering for extract() (string-keyed hashtables, EXTR_SKIP) and compact() (literal name list).
  • Wire extract_.php / compact_.php call() methods to the helper; enable JIT compliance tests for extract/compact.
  • Update docs/capabilities.md and bootstrap inventory/profile.

Closes #476

Test plan

  • VM: extract_compact.phpt and extract_skip.phpt via bin/vm.php
  • JIT compiles without LogicException for extract($t); echo $name;
  • Full gate: ./script/ci-local.sh in php-compiler:22.04-dev (bind-mount or script/docker-ci-local.sh)

Made with Cursor

Implement LLVM lowering for string-key scope import/export so template
code can use extract($data) and compact('a', 'b') without VM-only stubs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit b5d0606 into master May 22, 2026
@PurHur PurHur deleted the agent/stdlib-extract-compact branch May 22, 2026 07:45
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.

Stdlib: extract() and compact() JIT/AOT parity (#275 follow-up)

1 participant