JIT: shape-aware nested Variable writes + class-const autoload/case fixes (#16565 round 2) - #16933
Merged
Merged
Conversation
…ixes; zExt assert (#16565 round 2). Six more helper-runtime units unlocked, found via the LLVM assert patch: - VariableWriteNested (Variable::int/bool/float/string/array in nested helpers) blindly zExt'd loadValue() results: box-backed args (TYPE_VALUE or __value__ storage) yielded %__value__ structs handed to i64/i8/double parameters — module verify failures in Sprintf, FilterBatch, ClassUses*, GetClassMethods units. Now shape-aware: boxed args read through __value__read* accessors, native args width-adjust; bool writes via JitValueBox::writeBool direct field stores (the __value__writeBool symbol signature drifts between modules). - JitSprintf::writeArg: same class — TYPE_VALUE case now uses valuePtrFromVariable (not loadValue), and mistyped box-backed native args copy the box. - Class-const native fallback (tryJitNativeClassConstant) now autoloads like Zend does — the registry name is lowercased which breaks PSR-4, so callers thread the original-case literal as a hint (unlocks SleepJitHelper: VmSleepPure::PAST_TIMESTAMP_WARNING). - patches/php-llvm-structgep-assert.patch gains a zExt operand-kind assert (found VariableWriteNested in one run). Unit ledger: 47 disabled units at session start -> segfaults 17 -> 0; misc errors 6 -> 2 (Opendir return-type inference, ScopeBuiltin null ARG_SEND operand — precise repros captured); remainder are the known corpus-dependency class. Note: user-build sprintf linking (__compiler_printf undefined) is broken on master baseline — separate pre-existing #15642-class gap. Verified: AOT smoke green, LateStatic tests 3/3, M5 fast green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PurHur
added a commit
that referenced
this pull request
Jul 6, 2026
PurHur
added a commit
that referenced
this pull request
Jul 6, 2026
…16881/#16933 fixes. (#16940) 10 more units cached (Sleep, Unlink, Rmdir, Rename, Sprintf, FilterBatch, ClassUses, ClassUsesRecursive, GetClassMethods + late- static class). 38 remaining: 36 corpus-dependency (extern class-method binding, epic #16075), Opendir return-type inference, ScopeBuiltin null ARG_SEND operand. AOT smoke green with the cache on. Co-authored-by: PurHur <tedyyyyy@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
Six more helper-runtime units unlocked, each found in minutes via the
PHP_COMPILER_LLVM_ASSERT=1patch (now extended with a zExt operand assert):Variable::int/bool/float/string/arraynested lowerings) blindlyzExt(loadValue(...)): box-backed args yielded%__value__structs handed to i64/i8/double params — module verify failures in Sprintf/FilterBatch/ClassUses*/GetClassMethods units. Now shape-aware (boxed →__value__read*accessors; native → width-adjust; bool viaJitValueBox::writeBooldirect stores, dodging the__value__writeBoolsignature drift).Unit ledger since session start: segfaults 17 → 0, misc verify/type errors 6 → 2 (Opendir return-type inference, ScopeBuiltin null ARG_SEND operand — precise repros captured for follow-up), remainder = the known corpus-dependency class.
Also observed (pre-existing, baseline reproduces): user-build
printf/sprintflinking fails with undefined__compiler_printf— separate #15642-class gap.Verified: AOT smoke green · LateStatic 3/3 · M5 fast green · inventory + generated docs clean.
🤖 Generated with Claude Code