-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: plain struct flavor entities (#3277)
Remove array backing, propagating necessary changes. While we do use structs as arrays, it's simpler conceptually to model this as just another getter view instead of coupling strongly to an array storage model. This gives more flexibility to how these are defined, and give less gotchas via reference copying. This requires more definition of `pointer_view()`. Note that the main mechanism for ensuring `pointer_view()` is correct is checking that the number of listed members is the one expected (e.g. equals NUM_ALL_ENTITIES). Review notes: - A bunch of loops had to rethought as they previously did random access. Random access is possible in a sense, but only after constructing a pointer_view which, while cheap, is not free. As a result there's been some refactoring - zip_view has been used where possible, especially to get around the awkwardness of first creating the `pointer_view` and then using it as a structure to index into --------- Co-authored-by: ludamad <[email protected]>
- Loading branch information
Showing
21 changed files
with
1,340 additions
and
1,092 deletions.
There are no files selected for viewing
This file contains 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 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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.