Repository navigation
JIT: fix global/foreach/try assign lowering for AOT spine (#16828) - #16854
Merged
Merged
Conversation
Prescan `global $name` imports before try-merge blocks compile, allow native scalar and string phi rvalues in assignOperandValue, and harden TYPE_ASSIGN when alias operands are absent. Spine AOT now passes the original assign guard and fails later on DateException::class forward ref. Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur
force-pushed
the
agent/issue-16828-global-assign-foreach-try
branch
from
July 6, 2026 09:40
8493997 to
05d5008
Compare
3 tasks
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
global $nameimports across the whole function CFG before lowering try-merge blocks (foreach valid phi could compile beforeDECLARE_GLOBAL).assignOperandValue/assignOperandto handle native-scalar and stringKIND_VALUEphi operands instead of throwing.TYPE_ASSIGN/TYPE_CONCATwhen alias/dest operands are null (literal-RHS peephole).Closes #16828 (assign-guard blocker). Full spine bundle now progresses past
Cannot assign to a value/Cannot assignOperandValue to a valueand fails later onForward reference to class constant DateException::class(separate compile issue).Verification
Test plan
BootstrapAotJitCompileTest::testGlobalForeachTryAfterEarlyReturnCompiles(Docker/LLVM)Made with Cursor