Changeset 262040 in webkit


Ignore:
Timestamp:
May 21, 2020 7:17:54 PM (4 years ago)
Author:
rmorisset@apple.com
Message:

Various compile-time boolean flags could/should be marked constexpr
https://bugs.webkit.org/show_bug.cgi?id=212244

Reviewed by Mark Lam.

Source/JavaScriptCore:

This trivial patch saves roughly 16kB from the JavaScriptCore binary in release mode.

  • b3/B3OptimizeAssociativeExpressionTrees.cpp:
  • b3/air/AirAllocateRegistersByGraphColoring.cpp:
  • b3/air/AirSimplifyCFG.cpp:

(JSC::B3::Air::simplifyCFG):

  • b3/air/AirTmpWidth.cpp:

(JSC::B3::Air::TmpWidth::recompute):

  • dfg/DFGPredictionPropagationPhase.cpp:
  • heap/GCIncomingRefCountedInlines.h:

(JSC::GCIncomingRefCounted<T>::filterIncomingReferences):

  • heap/Heap.cpp:

(JSC::Heap::updateAllocationLimits):

  • wasm/WasmEntryPlan.cpp:

Source/WTF:

  • wtf/ParkingLot.cpp:

Tools:

  • TestWebKitAPI/Tests/WTF/Condition.cpp:
Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r262039 r262040  
     12020-05-21  Robin Morisset  <rmorisset@apple.com>
     2
     3        Various compile-time boolean flags could/should be marked constexpr
     4        https://bugs.webkit.org/show_bug.cgi?id=212244
     5
     6        Reviewed by Mark Lam.
     7
     8        This trivial patch saves roughly 16kB from the JavaScriptCore binary in release mode.
     9
     10        * b3/B3OptimizeAssociativeExpressionTrees.cpp:
     11        * b3/air/AirAllocateRegistersByGraphColoring.cpp:
     12        * b3/air/AirSimplifyCFG.cpp:
     13        (JSC::B3::Air::simplifyCFG):
     14        * b3/air/AirTmpWidth.cpp:
     15        (JSC::B3::Air::TmpWidth::recompute):
     16        * dfg/DFGPredictionPropagationPhase.cpp:
     17        * heap/GCIncomingRefCountedInlines.h:
     18        (JSC::GCIncomingRefCounted<T>::filterIncomingReferences):
     19        * heap/Heap.cpp:
     20        (JSC::Heap::updateAllocationLimits):
     21        * wasm/WasmEntryPlan.cpp:
     22
    1232020-05-21  Robin Morisset  <rmorisset@apple.com>
    224
  • trunk/Source/JavaScriptCore/b3/B3OptimizeAssociativeExpressionTrees.cpp

    r254996 r262040  
    5858
    5959    Procedure& m_proc;
    60     bool verbose { false };
     60    static constexpr bool verbose { false };
    6161};
    6262
  • trunk/Source/JavaScriptCore/b3/air/AirAllocateRegistersByGraphColoring.cpp

    r261755 r262040  
    4444namespace {
    4545
    46 bool debug = false;
    47 bool traceDebug = false;
    48 bool reportStats = false;
     46static constexpr bool debug = false;
     47static constexpr bool traceDebug = false;
     48static constexpr bool reportStats = false;
    4949
    5050// The AbstractColoringAllocator defines all the code that is independant
  • trunk/Source/JavaScriptCore/b3/air/AirSimplifyCFG.cpp

    r261755 r262040  
    3636bool simplifyCFG(Code& code)
    3737{
    38     const bool verbose = false;
     38    constexpr bool verbose = false;
    3939   
    4040    PhaseScope phaseScope(code, "simplifyCFG");
  • trunk/Source/JavaScriptCore/b3/air/AirTmpWidth.cpp

    r212970 r262040  
    5353    const bool beCareful = false;
    5454
    55     const bool verbose = false;
     55    constexpr bool verbose = false;
    5656
    5757    if (verbose) {
  • trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp

    r261895 r262040  
    3737namespace {
    3838
    39 bool verboseFixPointLoops = false;
     39static constexpr bool verboseFixPointLoops = false;
    4040
    4141class PredictionPropagationPhase : public Phase {
  • trunk/Source/JavaScriptCore/heap/GCIncomingRefCountedInlines.h

    r243467 r262040  
    6060bool GCIncomingRefCounted<T>::filterIncomingReferences(FilterFunctionType&& filterFunction)
    6161{
    62     const bool verbose = false;
     62    constexpr bool verbose = false;
    6363   
    6464    if (verbose)
  • trunk/Source/JavaScriptCore/heap/Heap.cpp

    r261755 r262040  
    9898namespace {
    9999
    100 bool verboseStop = false;
     100static constexpr bool verboseStop = false;
    101101
    102102double maxPauseMS(double thisPauseMS)
     
    22452245void Heap::updateAllocationLimits()
    22462246{
    2247     static constexpr bool verbose = false;
     2247    constexpr bool verbose = false;
    22482248   
    22492249    if (verbose) {
  • trunk/Source/JavaScriptCore/wasm/WasmEntryPlan.cpp

    r261755 r262040  
    3939
    4040namespace WasmEntryPlanInternal {
    41 static const bool verbose = false;
     41static constexpr bool verbose = false;
    4242}
    4343
  • trunk/Source/WTF/ChangeLog

    r262030 r262040  
     12020-05-21  Robin Morisset  <rmorisset@apple.com>
     2
     3        Various compile-time boolean flags could/should be marked constexpr
     4        https://bugs.webkit.org/show_bug.cgi?id=212244
     5
     6        Reviewed by Mark Lam.
     7
     8        * wtf/ParkingLot.cpp:
     9
    1102020-05-20  Mark Lam  <mark.lam@apple.com>
    211
  • trunk/Source/WTF/wtf/ParkingLot.cpp

    r261661 r262040  
    4141namespace {
    4242
    43 const bool verbose = false;
     43static constexpr bool verbose = false;
    4444
    4545struct ThreadData : public ThreadSafeRefCounted<ThreadData> {
  • trunk/Tools/ChangeLog

    r262034 r262040  
     12020-05-21  Robin Morisset  <rmorisset@apple.com>
     2
     3        Various compile-time boolean flags could/should be marked constexpr
     4        https://bugs.webkit.org/show_bug.cgi?id=212244
     5
     6        Reviewed by Mark Lam.
     7
     8        * TestWebKitAPI/Tests/WTF/Condition.cpp:
     9
    1102020-05-21  Mark Lam  <mark.lam@apple.com>
    211
  • trunk/Tools/TestWebKitAPI/Tests/WTF/Condition.cpp

    r257688 r262040  
    3939namespace {
    4040
    41 const bool verbose = false;
     41static constexpr bool verbose = false;
    4242
    4343enum NotifyStyle {
Note: See TracChangeset for help on using the changeset viewer.