Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid naked sizeof(C) for GCCell classes
Summary: To prepare for a future where the builtin `sizeof` operator doesn't always give the correct allocation size, even for a fixed-sized GCCell (e.g. due to trailing direct object properties), reroute all usage of `sizeof` on fixed-size GCCells through a template function `cellSize<C>`. The current implementation just returns `sizeof(C)`, so the behavior is currently unchanged. The plan is to override this for JSObject and its descendants, but for consistency and reduced risk of mistakes, it should be used for all fixed-sized cells. Reviewed By: tmikov Differential Revision: D18153281 fbshipit-source-id: 4d4fd19e3a788c8e8e9ab8d98d619c50134d382b
- Loading branch information
1 parent
e0747bd
commit 06147ee
Showing
24 changed files
with
152 additions
and
119 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
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
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
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.