Skip to content

Bootstrap Phase C: TYPE_THROW JIT + require_chain link (#57, #120)#538

Merged
PurHur merged 1 commit into
masterfrom
issue-bootstrap-jit-throw-require
May 22, 2026
Merged

Bootstrap Phase C: TYPE_THROW JIT + require_chain link (#57, #120)#538
PurHur merged 1 commit into
masterfrom
issue-bootstrap-jit-throw-require

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 22, 2026

Summary

  • Implement minimal TYPE_THROW JIT lowering (abort() + LLVM unreachable) and register libc abort in the JIT module.
  • Add TYPE_CAST_STRING JIT via JitNativeString::coerce so (string) casts in require_chain/main.php compile.
  • Promote test/bootstrap-aot/throw_logic.php and test/bootstrap-aot/require_chain/main.php to aot_link_targets (removed from $pendingUserFunc).
  • Update throw_logic fixture to use an in-file BootstrapThrowMarker class (avoids unresolved \LogicException at link time).
  • Regenerate docs/bootstrap-profile.json9 Phase C link targets; make bootstrap-aot-link passes locally.

Test plan

  • php script/bootstrap-profile.php --check
  • ./script/bootstrap-aot-link.sh (9 targets OK)
  • vendor/bin/phpunit test/unit/BootstrapProfileTest.php
  • CI green

Closes #57 (throw terminal link path). Contributes to #120 (require_once chain link).

Made with Cursor

Add minimal TYPE_THROW JIT (abort + unreachable), TYPE_CAST_STRING via
JitNativeString::coerce, and promote require_chain/throw_logic to
aot_link_targets (#57, #120).

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit 264fcfb into master May 22, 2026
@PurHur PurHur deleted the issue-bootstrap-jit-throw-require branch May 22, 2026 14:56
PurHur added a commit that referenced this pull request May 22, 2026
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.

Language: try/catch/finally lowering

1 participant