-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Optimize WTF::spanReinterpretCast #33954
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
Optimize WTF::spanReinterpretCast #33954
Conversation
|
EWS run on previous version of this PR (hash 3c61a1f) |
3c61a1f to
d060871
Compare
|
EWS run on previous version of this PR (hash d060871) |
d060871 to
98a7c56
Compare
|
EWS run on previous version of this PR (hash 98a7c56) |
98a7c56 to
0803c62
Compare
|
EWS run on previous version of this PR (hash 0803c62) |
0803c62 to
19f5ebe
Compare
|
EWS run on previous version of this PR (hash 19f5ebe) |
19f5ebe to
1f8fa0f
Compare
|
EWS run on previous version of this PR (hash 1f8fa0f) |
1f8fa0f to
9d9253b
Compare
|
EWS run on previous version of this PR (hash 9d9253b) |
9d9253b to
39a7e5f
Compare
|
EWS run on previous version of this PR (hash 39a7e5f) |
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.
lgtm still.
39a7e5f to
13fc31d
Compare
|
EWS run on previous version of this PR (hash 13fc31d) |
13fc31d to
1031833
Compare
|
EWS run on current version of this PR (hash 1031833) |
<https://bugs.webkit.org/show_bug.cgi?id=280032> <rdar://136330115> Reviewed by Alex Christensen. * Source/WTF/wtf/StdLibExtras.h: (WTF::spanReinterpretCast): - Fix Extent in return type when std::dynamic_extent is not used. - Prevent change of size in bytes when passing through spanReinterpretCast(): - Limit RELEASE_ASSERT() to cases where std::dynamic_extent is used, and one of the following criteria: - The source type is smaller than the destination type, or - The source type is not an integral multiple of the destination type. - Use static_assert() when not using std::dynamic_extent. - Fix name of function in message for static_assert() const-ness check. * Tools/TestWebKitAPI/Tests/WTF/StdLibExtrasTests.cpp: (TestWebKitAPI::TEST(WTF_StdLibExtras, SpanReinterpretCast_DynamicExtent)): Add. (TestWebKitAPI::TEST(WTF_StdLibExtras, SpanReinterpretCast_DynamicExtent_ManualRuntimeErrors)): Add. (TestWebKitAPI::TEST(WTF_StdLibExtras, SpanReinterpretCast_NonDynamicExtent)): Add. (TestWebKitAPI::TEST(WTF_StdLibExtras, SpanReinterpretCast_NonDynamicExtent_CompileTimeErros)): Add. - Add tests. Canonical link: https://commits.webkit.org/284316@main
1031833 to
9359aad
Compare
|
Committed 284316@main (9359aad): https://commits.webkit.org/284316@main Reviewed commits have been landed. Closing PR #33954 and removing active labels. |
🧪 vision-wk2
9359aad
1031833