-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Use more compact representation for packed arrays. #7491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
320ad87
Use more compact representation for packed arrays.
dstogov 63f76a6
Fixed memory leaks in ext/standard/tests/array/shuffle_basic2.phpt
dstogov ebda1e8
Move condition
dstogov 6b1e401
Revert packed array related changes
dstogov d5c69ed
Merge branch 'master' into packed_ht
dstogov ebbde91
ws
dstogov ea245bd
Packed arrays can't contain IS_INDIRECT elements
dstogov 1b30fd9
Use specific array/hash/packed iterators where possible
dstogov 319383d
Use general hash/packed iterators
dstogov 6092d79
Micro-optimization of genral hash/packed array iteration macros ZEND_…
dstogov 718042a
Fixed ARM64 JIT
dstogov 8e33bf8
Sparate ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_EL…
dstogov 7c6f54e
Rename ZEND_HASH_*_FOREACH_* iteration macros
dstogov bf21211
Merge branch 'master' into packed_ht
dstogov bf4bf22
Fixed typo
dstogov a9f8192
Fixed comment
dstogov 7b81cde
Remove redundand HT_IS_PACKED asserts and add a missed one
dstogov 570fadd
Use specialized packed/hash iterators
dstogov cc3b921
Use general hash iteration macros
dstogov 361eb14
Attempt to fix Windows build
dstogov bf316ba
Use genral macro "ZEND_HASH_ELEMENT(ht, i)" instead of "HT_IS_PACKED(…
dstogov ff48182
Use specialized packed iterator. (We checked for !HT_IS_CACHE above).
dstogov 9bbaf67
Use general hash/packed iteratr or HT_IS_CACHE check
dstogov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this may not be true, e.g. the usage at
php-src/ext/hash/hash.c
Line 1558 in 4239ec5
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EDIT: I see this was undone so no concerns, agree it may be packed
Also, userland code can directly call functions such as
$splDoubleLinkedList->__unserialize($data)
with any array value as$data[2]
getting passed asproperties
toobject_properties_load
.Deque
RFC implementation forbids that, for exampleAnd third party serializers may not have the same restrictions on arrays in the future, even if they currently do (igbinary currently does convert non-empty packed arrays to hashes while unserializing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ TysonAndre this chunk is reverted. I didn't understand, do you still see some problem here?