Skip to content

php-in-php: ErrorRaise/TypeErrorRaise pending buffer via JIT helpers (#9778) - #10520

Merged
PurHur merged 1 commit into
masterfrom
agent/runtime-php-error-raise-9778
Jun 21, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/runtime-php-error-raise-9778

Conversation

@PurHur

@PurHur PurHur commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • Route JIT/AOT catchable Error and TypeError pending state through new PHP SSOT helpers ext/standard/ErrorRaiseJitHelper.php and ext/standard/TypeErrorRaiseJitHelper.php instead of per-module LLVM globals (phpc_jit_error_pending_*, phpc_jit_type_error_pending_*).
  • ErrorRaise.php / TypeErrorRaise.php now emit thin LLVM bridges (raise/has/clear/copy) that call compiled PHP helpers; bodies link at Context::compileInPlace() after user IR is lowered.
  • Nested helper compile uses block-storage isolation (Refresh compiler_lib spine sidecar after native full-spine AOT compile (#2201) #8559), CallArgv init, and hashtable decls before compile (ObGzhandler pattern).

php-src ref: Zend/zend_exceptions.czend_throw_error, catchable Error/TypeError dispatch

LLVM removed: registerPendingGlobals / implementRaiseFunction / global memcpy pending buffers in both modules

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter ErrorRaiseRuntimeShrinkTest'
# OK (4 tests, 22 assertions)

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter TypeErrorRaiseRuntimeShrinkTest'
# OK (2 tests, 13 assertions)

php script/check-selfhost-spine-coverage-sync.php
# check-selfhost-spine-coverage-sync: OK

make bootstrap-selfhost-vm-driver-execute-probe
# bootstrap-selfhost-vm-driver-execute-probe: OK

Closes #9778

Made with Cursor

…T helpers (#9778)

Move catchable Error/TypeError pending state from per-module LLVM globals
into ErrorRaiseJitHelper and TypeErrorRaiseJitHelper PHP SSOT; JIT/AOT
bridges call compiled helpers at link time (compileInPlace) with nested-compile
isolation matching ObGzhandler (#8559).

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.

php-in-php: JIT ErrorRaise + TypeErrorRaise — route catchable Error/TypeError through VmException PHP not ~920-line LLVM (#1492)

1 participant