Bug 212244

Summary: Various compile-time boolean flags could/should be marked constexpr
Product: WebKit Reporter: Robin Morisset <rmorisset>
Component: JavaScriptCoreAssignee: Robin Morisset <rmorisset>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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>