Bug 212244 - Various compile-time boolean flags could/should be marked constexpr
Summary: Various compile-time boolean flags could/should be marked constexpr
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Robin Morisset
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-21 17:54 PDT by Robin Morisset
Modified: 2020-05-21 19:18 PDT (History)
10 users (show)

See Also:


Attachments
Patch (7.62 KB, patch)
2020-05-21 17:56 PDT, Robin Morisset
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Morisset 2020-05-21 17:54:18 PDT
Lots of files in JSC have a bool verbose = false; at the top, that we can flip to true when we want to debug things.
These should all be constexpr, to help the compiler eliminate all of the code that branches on these flags.
I checked, and this patch reduces binary size by roughly 16kB.
Comment 1 Robin Morisset 2020-05-21 17:56:54 PDT
Created attachment 400007 [details]
Patch
Comment 2 Mark Lam 2020-05-21 19:02:54 PDT
Comment on attachment 400007 [details]
Patch

r=me
Comment 3 EWS 2020-05-21 19:17:58 PDT
Committed r262040: <https://trac.webkit.org/changeset/262040>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 400007 [details].
Comment 4 Radar WebKit Bug Importer 2020-05-21 19:18:12 PDT
<rdar://problem/63523398>