| Summary: | [GCC] REGRESSION(r293605): error: cannot convert ‘<brace-enclosed initializer list>’ to ‘unsigned char:3’ in initialization | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Diego Pino <dpino> | ||||||||||
| Component: | New Bugs | Assignee: | Diego Pino <dpino> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | bugs-noreply, darin, ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer, ysuzuki | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | WebKit Nightly Build | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=239828 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Diego Pino
2022-04-29 05:31:26 PDT
Created attachment 458583 [details]
Patch
Comment on attachment 458583 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458583&action=review > Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.h:111 > - Kind m_kind : bitsOfKind { Kind::None }; > + Kind m_kind { Kind::None }; I believe this will make the object larger. Can we keep the optimization under other compilers? Comment on attachment 458583 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458583&action=review >> Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.h:111 >> + Kind m_kind { Kind::None }; > > I believe this will make the object larger. Can we keep the optimization under other compilers? Yes, this needs to be small. So, we need different solution. Comment on attachment 458583 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458583&action=review >>> Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.h:111 >>> + Kind m_kind { Kind::None }; >> >> I believe this will make the object larger. Can we keep the optimization under other compilers? > > Yes, this needs to be small. So, we need different solution. Should be able to work around this by using the type unsigned and casting to and from Kind when accessing the data member. It would be a shame to do that forever though. We want to work around the problem somehow in a way that can easily be removed once gcc is sufficiently improved. Created attachment 458842 [details]
Patch
Comment on attachment 458842 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458842&action=review r=me with comment. > Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.h:50 > + MethodOfGettingAValueProfile() { m_kind = Kind::None; } Please use initialization list, and annotate it with constexpr. constexpr MethodOfGettingAValueProfile() : m_kind(Kind::None) { } Created attachment 458852 [details]
[fast-cq] Patch
(In reply to Yusuke Suzuki from comment #6) > Comment on attachment 458842 [details] > Patch > Please use initialization list, and annotate it with constexpr. > > constexpr MethodOfGettingAValueProfile() > : m_kind(Kind::None) > { > } It seems the constructor cannot be `constexpr`. ``` /app/webkit/Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.h: In constructor ‘constexpr JSC::MethodOfGettingAValueProfile::MethodOfGettingAValueProfile()’: /app/webkit/Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.h:51:28: error: call to non-‘constexpr’ function ‘JSC::CodeOrigin::CodeOrigin()’ 51 | : m_kind(Kind::None) ``` Created attachment 458855 [details]
Patch
Committed r293828 (250301@main): <https://commits.webkit.org/250301@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 458855 [details]. |