Perf: strval of overflow floats via foreach matches Zend (#36386) - #37082
Merged
Conversation
TYPE_VALUE arm used raw ->value; prefer valuePtrFromVariable (peer floatval) and materialize lazy ±/× overflow before the native-long arm. Co-authored-by: Cursor <cursoragent@cursor.com>
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
strval()of overflow-promoted floats (e.g.PHP_INT_MAX + 1via foreach / assign-from-fetch) printed empty under AOT while(string)/floatval/sprintf("%s")/echomatched Zend — leftover of Perf: lazy f64 overflow slot for native-long ±/× (#36386) #37051 lazy ±/× materialize.strvalTYPE_VALUE arm passed raw$args[0]->value;floatvalusesJitValueBox::valuePtrFromVariable. Also materialize overflowable native-long before the native-long arm.ext/standard/type.cphp_strval/convert_to_string.Part of #36386
Test plan
./script/phpunit.sh --filter StrvalOverflowableForeachAotTest→ OK (4 tests, 20 assertions)./script/aot-smoke.sh→ 9 passed, 0 failed (size gate OK)make north-star5-verify-fast→ OK (spine 8354/8354)script/differential-sweep.sh --aot(no call/CFG shape change beyond strval arg pointer normalize)Made with Cursor