Make hash_combine support enums automatically#42651
Closed
NickGerleman wants to merge 2 commits into
Closed
Conversation
Summary: We are making some decently large changes around here, to transition Fabric away from Yoga's private API, and add new units, and CSS properties. Even confined to Fabric, we have a large matrix of different paths for parsing. This change consolidates layout props parsing to a single, tested path, used everywhere. Concretely, this means removing: 1. MapBuffer for ViewProps 2. Iterator style props parsing (for layout props only) MapBuffer for ViewProps to my understanding is not currently used at all, and has been live to edits, but untested, for quite some time. Iterator style props parsing is still enabled in some configurations, but we don't want to broadly ship its current form, and haven't been able to prioritize shipping it. Both MapBuffer, and iterator style props parser, are performance wins. If we look at seriously shipping one of these again, we should look at swapping out the current path. Changelog: [Internal] Differential Revision: D53072714
Summary: Lots of boilerplate to define hash functions for different enums, so we can use them in `hash_combine`. This change makes it so that `hash_combine` will automatically hash underlying type of enums. I chose not to specialize enums generically with `std::hash` functor because it feels like we shouldn't leak that. But `hash_combine` we can make this change to. Changelog: [Internal] Differential Revision: D53074535
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D53074535 |
Base commit: f322dc7 |
Contributor
|
This pull request has been merged in 359738b. |
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:
Lots of boilerplate to define hash functions for different enums, so we can use them in
hash_combine.This change makes it so that
hash_combinewill automatically hash underlying type of enums.I chose not to specialize enums generically with
std::hashfunctor because it feels like we shouldn't leak that. Buthash_combinewe can make this change to.Changelog: [Internal]
Differential Revision: D53074535