Repository navigation
AOT: DateTime add/sub with runtime DateInterval (#33781) - #33786
Merged
Merged
Conversation
…LLVM (#33781) Thin user-script AOT cannot NestedJIT DateMutationRuntime (__nativearray__boundscheck). When compileTimeDateInterval is known on the argument, apply y/m/d via JitGetdate civil math (same approach as modify +1 month). Removes the #30760 compile-time-only throw. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Aug 22, 2026
PurHur
added a commit
that referenced
this pull request
Aug 22, 2026
…ering (#33781 leftover). (#33803) The OOP add/sub path was fixed in #33786 but date_add() still used a separate requireDateTimeObject + returnObjectArg lowering that aborted (rc=134) on runtime P1M intervals under user AOT. Co-authored-by: PurHur <PurHur@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.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.
Summary
DateTime{,Immutable}::add/subwhen the interval is a variable with year/month components (P1M, etc.)compileTimeDateIntervalis known on the argument (typical$i = new DateInterval('P1M')), apply interval viaJitGetdatecivil LLVM — same approach asmodify('+1 month')(Regression: AOT DateTimeImmutable::modify("+1 month") refused — compile-time receiver required (re-#26789, ext/date/php_date.c) #27262)DateMutationRuntimeremains unavailable in thin user-script AOT (__nativearray__boundscheck); full JIT/AOT spine still uses__phpc_date_apply_intervalphp-src reference
ext/date/php_date.c—date_add/date_sub/DateTime::addVerification
Not covered: truly dynamic intervals where
compileTimeDateIntervalis absent (computed spec at runtime) — still uses runtime property-read LLVM path; month reads need follow-up if that case matters.Closes #33781
Made with Cursor