Skip to content

Stdlib JIT: spl_autoload_register + move_uploaded_file; M2 spine +6 - #2016

Merged
PurHur merged 1 commit into
masterfrom
agent/stdlib-spl_autoload_move_uploaded
May 25, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/stdlib-spl_autoload_move_uploaded

Conversation

@PurHur

@PurHur PurHur commented May 25, 2026

Copy link
Copy Markdown
Owner

Summary

Advances North Star 2 (#1056 / #1492) with JIT stdlib work and M2 spine growth:

  • spl_autoload_register JIT (#1776): compile-time string user-function callbacks register via phpc_spl_autoload.c; TYPE_NEW emits __phpc_spl_autoload_dispatch for non–user-declared classes. Array/closure callbacks remain VM-only (SplAutoloadCallbackPolicy).
  • move_uploaded_file JIT (#2005): __compiler_move_uploaded_file in phpc_fs_dir.c (upload-temp prefix + .. guard).
  • M2 spine: add ini_get_.php, move_uploaded_file.php, JitMoveUploadedFile.php, JitSplAutoload.php, SplAutoloadOutput.php, SplAutoloadCallbackPolicy.php600/606 units (~99%).

Test plan

  • vendor/bin/phpunit test/unit/SplAutoloadRegisterTest.php
  • php bin/compile.php -l test/selfhost/compiler_lib_spine_smoke/main.php
  • php script/capability-matrix.php --check
  • php script/check-selfhost-spine-coverage-sync.php
  • @group llvm compliance (SplAutoloadRegisterJITTest, MoveUploadedFileJITTest) — requires LLVM 9 MCJIT execute (compile verified; harness JIT run may segfault without full toolchain)

Closes #1776

Made with Cursor

…1776, #1492)

- spl_autoload_register: compile-time string callbacks, C stack, dispatch before TYPE_NEW
- move_uploaded_file: __compiler_move_uploaded_file in phpc_fs_dir.c
- Spine: ini_get_, move_uploaded_file, JitSplAutoload helpers (600/606 units)
- Capabilities + stdlib-jit-audit sync; compliance/unit tests

Closes #1776
Contributes to #1056 / #1492

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur force-pushed the agent/stdlib-spl_autoload_move_uploaded branch from 3e08adc to 08bcde1 Compare May 25, 2026 12:08
@PurHur
PurHur merged commit fa3a6e6 into master May 25, 2026
@PurHur
PurHur deleted the agent/stdlib-spl_autoload_move_uploaded branch May 25, 2026 12:08
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.

JIT: spl_autoload_register compile-time lowering (#1369 phase 2)

1 participant