Changeset 225464 in webkit


Ignore:
Timestamp:
Dec 3, 2017 3:00:47 PM (6 years ago)
Author:
Caio Lima
Message:

Rename DestroyFunc to avoid redefinition on unified build
https://bugs.webkit.org/show_bug.cgi?id=180335

Reviewed by Filip Pizlo.

Changing DestroyFunc structures to more specific names to avoid
conflits on unified builds.

  • heap/HeapCellType.cpp:

(JSC::HeapCellType::finishSweep):
(JSC::HeapCellType::destroy):

  • runtime/JSDestructibleObjectHeapCellType.cpp:

(JSC::JSDestructibleObjectHeapCellType::finishSweep):
(JSC::JSDestructibleObjectHeapCellType::destroy):

  • runtime/JSSegmentedVariableObjectHeapCellType.cpp:

(JSC::JSSegmentedVariableObjectHeapCellType::finishSweep):
(JSC::JSSegmentedVariableObjectHeapCellType::destroy):

  • runtime/JSStringHeapCellType.cpp:

(JSC::JSStringHeapCellType::finishSweep):
(JSC::JSStringHeapCellType::destroy):

  • wasm/js/JSWebAssemblyCodeBlockHeapCellType.cpp:

(JSC::JSWebAssemblyCodeBlockHeapCellType::finishSweep):
(JSC::JSWebAssemblyCodeBlockHeapCellType::destroy):

Location:
trunk/Source/JavaScriptCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r225443 r225464  
     12017-12-03  Caio Lima  <ticaiolima@gmail.com>
     2
     3        Rename DestroyFunc to avoid redefinition on unified build
     4        https://bugs.webkit.org/show_bug.cgi?id=180335
     5
     6        Reviewed by Filip Pizlo.
     7
     8        Changing DestroyFunc structures to more specific names to avoid
     9        conflits on unified builds.
     10
     11        * heap/HeapCellType.cpp:
     12        (JSC::HeapCellType::finishSweep):
     13        (JSC::HeapCellType::destroy):
     14        * runtime/JSDestructibleObjectHeapCellType.cpp:
     15        (JSC::JSDestructibleObjectHeapCellType::finishSweep):
     16        (JSC::JSDestructibleObjectHeapCellType::destroy):
     17        * runtime/JSSegmentedVariableObjectHeapCellType.cpp:
     18        (JSC::JSSegmentedVariableObjectHeapCellType::finishSweep):
     19        (JSC::JSSegmentedVariableObjectHeapCellType::destroy):
     20        * runtime/JSStringHeapCellType.cpp:
     21        (JSC::JSStringHeapCellType::finishSweep):
     22        (JSC::JSStringHeapCellType::destroy):
     23        * wasm/js/JSWebAssemblyCodeBlockHeapCellType.cpp:
     24        (JSC::JSWebAssemblyCodeBlockHeapCellType::finishSweep):
     25        (JSC::JSWebAssemblyCodeBlockHeapCellType::destroy):
     26
    1272017-12-01  JF Bastien  <jfbastien@apple.com>
    228
  • trunk/Source/JavaScriptCore/heap/HeapCellType.cpp

    r225314 r225464  
    3232namespace JSC {
    3333
    34 namespace {
    35 
    3634// Writing it this way ensures that when you pass this as a functor, the callee is specialized for
    3735// this callback. If you wrote this as a normal function then the callee would be specialized for
    3836// the function's type and it would have indirect calls to that function. And unlike a lambda, it's
    3937// possible to mark this ALWAYS_INLINE.
    40 struct DestroyFunc {
     38struct DefaultDestroyFunc {
    4139    ALWAYS_INLINE void operator()(VM& vm, JSCell* cell) const
    4240    {
     
    4947    }
    5048};
    51 
    52 } // anonymous namespace
    5349
    5450HeapCellType::HeapCellType(AllocatorAttributes attributes)
     
    6359void HeapCellType::finishSweep(MarkedBlock::Handle& block, FreeList* freeList)
    6460{
    65     block.finishSweepKnowingHeapCellType(freeList, DestroyFunc());
     61    block.finishSweepKnowingHeapCellType(freeList, DefaultDestroyFunc());
    6662}
    6763
    6864void HeapCellType::destroy(VM& vm, JSCell* cell)
    6965{
    70     DestroyFunc()(vm, cell);
     66    DefaultDestroyFunc()(vm, cell);
    7167}
    7268
  • trunk/Source/JavaScriptCore/runtime/JSDestructibleObjectHeapCellType.cpp

    r225314 r225464  
    3232namespace JSC {
    3333
    34 namespace {
    35 
    36 struct DestroyFunc {
     34struct JSDestructibleObjectDestroyFunc {
    3735    ALWAYS_INLINE void operator()(VM&, JSCell* cell) const
    3836    {
     
    4038    }
    4139};
    42 
    43 } // anonymous namespace
    4440
    4541JSDestructibleObjectHeapCellType::JSDestructibleObjectHeapCellType()
     
    5450void JSDestructibleObjectHeapCellType::finishSweep(MarkedBlock::Handle& handle, FreeList* freeList)
    5551{
    56     handle.finishSweepKnowingHeapCellType(freeList, DestroyFunc());
     52    handle.finishSweepKnowingHeapCellType(freeList, JSDestructibleObjectDestroyFunc());
    5753}
    5854
    5955void JSDestructibleObjectHeapCellType::destroy(VM& vm, JSCell* cell)
    6056{
    61     DestroyFunc()(vm, cell);
     57    JSDestructibleObjectDestroyFunc()(vm, cell);
    6258}
    6359
  • trunk/Source/JavaScriptCore/runtime/JSSegmentedVariableObjectHeapCellType.cpp

    r225314 r225464  
    3232namespace JSC {
    3333
    34 namespace {
    35 
    36 struct DestroyFunc {
     34struct JSSegmentedVariableObjectDestroyFunc {
    3735    ALWAYS_INLINE void operator()(VM&, JSCell* cell) const
    3836    {
     
    4038    }
    4139};
    42 
    43 } // anonymous namespace
    4440
    4541JSSegmentedVariableObjectHeapCellType::JSSegmentedVariableObjectHeapCellType()
     
    5450void JSSegmentedVariableObjectHeapCellType::finishSweep(MarkedBlock::Handle& handle, FreeList* freeList)
    5551{
    56     handle.finishSweepKnowingHeapCellType(freeList, DestroyFunc());
     52    handle.finishSweepKnowingHeapCellType(freeList, JSSegmentedVariableObjectDestroyFunc());
    5753}
    5854
    5955void JSSegmentedVariableObjectHeapCellType::destroy(VM& vm, JSCell* cell)
    6056{
    61     DestroyFunc()(vm, cell);
     57    JSSegmentedVariableObjectDestroyFunc()(vm, cell);
    6258}
    6359
  • trunk/Source/JavaScriptCore/runtime/JSStringHeapCellType.cpp

    r225314 r225464  
    3232namespace JSC {
    3333
    34 namespace {
    35 
    36 struct DestroyFunc {
     34struct JSStringDestroyFunc {
    3735    ALWAYS_INLINE void operator()(VM&, JSCell* cell) const
    3836    {
     
    4038    }
    4139};
    42 
    43 } // anonymous namespace
    4440
    4541JSStringHeapCellType::JSStringHeapCellType()
     
    5450void JSStringHeapCellType::finishSweep(MarkedBlock::Handle& handle, FreeList* freeList)
    5551{
    56     handle.finishSweepKnowingHeapCellType(freeList, DestroyFunc());
     52    handle.finishSweepKnowingHeapCellType(freeList, JSStringDestroyFunc());
    5753}
    5854
    5955void JSStringHeapCellType::destroy(VM& vm, JSCell* cell)
    6056{
    61     DestroyFunc()(vm, cell);
     57    JSStringDestroyFunc()(vm, cell);
    6258}
    6359
  • trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyCodeBlockHeapCellType.cpp

    r225314 r225464  
    3535namespace JSC {
    3636
    37 namespace {
    38 
    39 struct DestroyFunc {
     37struct JSWebAssemblyCodeBlockDestroyFunc {
    4038    ALWAYS_INLINE void operator()(VM&, JSCell* cell) const
    4139    {
     
    4442    }
    4543};
    46 
    47 } // anonymous namespace
    4844
    4945JSWebAssemblyCodeBlockHeapCellType::JSWebAssemblyCodeBlockHeapCellType()
     
    5854void JSWebAssemblyCodeBlockHeapCellType::finishSweep(MarkedBlock::Handle& handle, FreeList* freeList)
    5955{
    60     handle.finishSweepKnowingHeapCellType(freeList, DestroyFunc());
     56    handle.finishSweepKnowingHeapCellType(freeList, JSWebAssemblyCodeBlockDestroyFunc());
    6157}
    6258
    6359void JSWebAssemblyCodeBlockHeapCellType::destroy(VM& vm, JSCell* cell)
    6460{
    65     DestroyFunc()(vm, cell);
     61    JSWebAssemblyCodeBlockDestroyFunc()(vm, cell);
    6662}
    6763
Note: See TracChangeset for help on using the changeset viewer.