feat(core): align AOT and eval Core builtin support - #893
Draft
nahime0 wants to merge 118 commits into
Draft
Conversation
|
Too many files changed for review (2167 files, 100 file limit). |
nahime0
force-pushed
the
feat/core-align
branch
from
September 5, 2026 20:58
f8d0dcb to
c738392
Compare
Member
Author
|
Sorry @Guikingone, I've found some issues and must postpone your review on this one |
nahime0
marked this pull request as draft
September 7, 2026 10:10
nahime0
force-pushed
the
feat/core-align
branch
from
September 7, 2026 11:57
551d0ef to
9c4d101
Compare
Keep error masks, handler descriptors, and class ids out of x9 when symbol helpers use it as address scratch.\n\nRoute conditional exception fallbacks through local labels so Darwin assemblers can link the external report helper.
Lower generated array_slice tails directly to typed EIR so variadic callees receive the element representation declared by their signature.
Keep returned cells alive when dynamic functions, closures, or methods return storage owned by a persistent static local.
Free resource inventory nodes during normal process teardown and Web request reset, clear the list, and restore the request-local resource id counter.
Remove the legacy Web prelude declaration now that trigger_error is supplied by the common Core builtin registry.
Update catalog counts, callback metadata, stream-context expectations, and the SysV analyzer inventory for the completed Core surface.
Route Web prelude warnings through a private formatter before the shared Core trigger_error builtin so session diagnostics keep their PHP category prefixes without redeclaring the public builtin.
Route Magician GC operations through platform-mangled eval bridge wrappers so Mach-O links Rust references to the internal runtime helpers correctly.
Make trigger_error accept only PHP user levels, emit located default diagnostics, and preserve fatal E_USER_ERROR semantics across AOT and eval. Resolve the default set_error_handler mask from the selected PHP profile and keep internal web diagnostics off the public trigger_error path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aligns the Core builtin contract and its AOT and Magician implementations, including the callable, ownership, and runtime-state regressions found during review. Rebased onto main at
217ff6caawithout merging the PR.The internal Core inventory is 59/59 on both backends. This is not a claim of complete PHP compatibility: the generated PHP 8.5 comparison is 57/62 functions. The inventory excludes
clone,get_error_handler(), andget_exception_handler(); the comparison countsdieandexitseparately as language constructs.Changes
error_reporting()queries, and unhandled user-error termination.PHP_INT_SIZE.Deliberate bounds
fclose()still operates on eval-managed streams. Synchronizing native locals into eval also retains them until the next synchronization or context release.Core/usergrouping.disable_functionsis unsupported, soget_defined_functions()accepts the flag without changing the inventory.get_required_files()remains PHP's alias ofget_included_files().threshold,buffer_size, andfulldo not claim Zend collector-buffer parity.Validation
Before local testing was stopped at the user's request, all 69 Core codegen tests and 23 shared-contract tests passed after the rebase. Focused checks also passed for the Core/PCNTL context ownership interaction, distinct eval status codes, five-target bridge exports, SysV runtime call alignment, and target-aware
E_ALL. The remaining PCNTL executable checks were interrupted rather than reported as passed. No complete local suite was run.Generated documentation and builtin-to-EIR boundary audits passed against the combined contract. The PR CI supplies the complete executable target matrix and iOS compile/emitter checks; the user is monitoring that run. No merge is performed by this work.