Fix ConstStringFolder ICmp lowering for self-host probe (#1056, #1086)#1160
Merged
Conversation
Use JitValueBox::valuePtrFromVariable for string/boxed === comparisons so type-tag loads use __value__* not __ref__ structs. Re-enable ConstStringFolder real JIT lowering with value/object identity and foreach object copy support. Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve JIT.php conflict: keep ConstStringFolder real LLVM lowering (PR #1160) and drop master's short-name stub skip list for those methods. 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
ConstStringFolder::sourceDirby loading boxed value type tags viaJitValueBox::valuePtrFromVariableinJitStringCompare::identicalValueToString(was comparing%__ref__againsti8type tags).===, foreach object copy, and simplifiedrealpathchecks insourceDir.Root cause
'' !== $resolvedinConstStringFolder::sourceDirlowers to string-vs-boxed!==.identicalValueToStringused the raw__value__alloca ($boxed->value) instead of a__value__*pointer, sostructGep(..., 'type')read the wrong field and produced invalidicmp eq %__ref__ ..., i8 <tag>IR.Test plan
make bootstrap-selfhost-probeexit 0./script/bootstrap-wave-check.shgreen (selfhost-lint, aot-lint, probe)test/bootstrap-aot/const_string_folder_*via aot-lintrefs #1056, #1086
Made with Cursor