Skip to content

php-in-php: lazy LastErrorRuntime from ensureMinimal (#34631) - #34633

Merged
PurHur merged 1 commit into
masterfrom
agent/php-in-php-34631-lasterror-ensureminimal-lazy
Aug 25, 2026
Merged

php-in-php: lazy LastErrorRuntime from ensureMinimal (#34631)#34633
PurHur merged 1 commit into
masterfrom
agent/php-in-php-34631-lasterror-ensureminimal-lazy

Conversation

@PurHur

@PurHur PurHur commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Drop always-on LastErrorRuntime from Context::ensureMinimalUserStandaloneBodies (peer php-in-php: drop Context ensureMinimalUserStandaloneBodies always-on JitReturnPending — lazy at try/finally (peer #34612) #34621).
  • Thin AOT hello-world no longer eagerly NestedJITs last-error ABI; JitErrorGetLast / JitTriggerErrorKernel already ensureLinked lazily (StringTriggerError always-on still pulls LastError when trigger_error is linked).
  • LastErrorRuntime::implement captures/restores builder insert (was always clearInsertionPosition) so mid-{main} ensure is safe.
  • Add ContextMinimalStandaloneLazyLastErrorRuntimeShrinkTest; update peer shrink tests.
  • No new runtime/*.c.

Closes #34631

Test plan

  • ./script/phpunit.sh --filter 'ContextMinimalStandaloneLazyLastError|ContextMinimalStandaloneLazyReturnPending|ContextMinimalStandaloneLazyHtmlErrorHandler|ContextMinimalStandaloneLazyDomGcProgressAssert|LastErrorRuntimeShrink|TypeDeadTypeInitializeLazyAssertLastError|ExamplesHelloWorldAotRegression' → OK (24 tests)
  • ./script/aot-smoke.sh8 passed, 0 failed
  • ./script/docker-exec.sh -- bash -lc 'script/cold-build-check.sh' → ok (4s)
  • AOT trigger_error + error_get_last / error_clear_last matches Zend (512|boom / NULL)

php-src: ext/standard/basic_functions.c (error_get_last / error_clear_last)

Lane: php-runtime-migration — #32122 / #31968 children closed; C floor empty; continued ensureMinimal shrink.

Made with Cursor

Drop always-on LastError NestedJIT from thin AOT user-script init; call sites
already ensureLinked. Restore builder insert mid-{main} (peer #34621).

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 6280e3c into master Aug 25, 2026
1 check failed
@PurHur
PurHur deleted the agent/php-in-php-34631-lasterror-ensureminimal-lazy branch August 25, 2026 06:25
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: drop Context ensureMinimalUserStandaloneBodies always-on LastErrorRuntime — lazy at error_get_last/trigger_error (peer #34621)

1 participant