Changeset 225464 in webkit
- Timestamp:
- Dec 3, 2017 3:00:47 PM (6 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r225443 r225464 1 2017-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 1 27 2017-12-01 JF Bastien <jfbastien@apple.com> 2 28 -
trunk/Source/JavaScriptCore/heap/HeapCellType.cpp
r225314 r225464 32 32 namespace JSC { 33 33 34 namespace {35 36 34 // Writing it this way ensures that when you pass this as a functor, the callee is specialized for 37 35 // this callback. If you wrote this as a normal function then the callee would be specialized for 38 36 // the function's type and it would have indirect calls to that function. And unlike a lambda, it's 39 37 // possible to mark this ALWAYS_INLINE. 40 struct De stroyFunc {38 struct DefaultDestroyFunc { 41 39 ALWAYS_INLINE void operator()(VM& vm, JSCell* cell) const 42 40 { … … 49 47 } 50 48 }; 51 52 } // anonymous namespace53 49 54 50 HeapCellType::HeapCellType(AllocatorAttributes attributes) … … 63 59 void HeapCellType::finishSweep(MarkedBlock::Handle& block, FreeList* freeList) 64 60 { 65 block.finishSweepKnowingHeapCellType(freeList, De stroyFunc());61 block.finishSweepKnowingHeapCellType(freeList, DefaultDestroyFunc()); 66 62 } 67 63 68 64 void HeapCellType::destroy(VM& vm, JSCell* cell) 69 65 { 70 De stroyFunc()(vm, cell);66 DefaultDestroyFunc()(vm, cell); 71 67 } 72 68 -
trunk/Source/JavaScriptCore/runtime/JSDestructibleObjectHeapCellType.cpp
r225314 r225464 32 32 namespace JSC { 33 33 34 namespace { 35 36 struct DestroyFunc { 34 struct JSDestructibleObjectDestroyFunc { 37 35 ALWAYS_INLINE void operator()(VM&, JSCell* cell) const 38 36 { … … 40 38 } 41 39 }; 42 43 } // anonymous namespace44 40 45 41 JSDestructibleObjectHeapCellType::JSDestructibleObjectHeapCellType() … … 54 50 void JSDestructibleObjectHeapCellType::finishSweep(MarkedBlock::Handle& handle, FreeList* freeList) 55 51 { 56 handle.finishSweepKnowingHeapCellType(freeList, DestroyFunc());52 handle.finishSweepKnowingHeapCellType(freeList, JSDestructibleObjectDestroyFunc()); 57 53 } 58 54 59 55 void JSDestructibleObjectHeapCellType::destroy(VM& vm, JSCell* cell) 60 56 { 61 DestroyFunc()(vm, cell);57 JSDestructibleObjectDestroyFunc()(vm, cell); 62 58 } 63 59 -
trunk/Source/JavaScriptCore/runtime/JSSegmentedVariableObjectHeapCellType.cpp
r225314 r225464 32 32 namespace JSC { 33 33 34 namespace { 35 36 struct DestroyFunc { 34 struct JSSegmentedVariableObjectDestroyFunc { 37 35 ALWAYS_INLINE void operator()(VM&, JSCell* cell) const 38 36 { … … 40 38 } 41 39 }; 42 43 } // anonymous namespace44 40 45 41 JSSegmentedVariableObjectHeapCellType::JSSegmentedVariableObjectHeapCellType() … … 54 50 void JSSegmentedVariableObjectHeapCellType::finishSweep(MarkedBlock::Handle& handle, FreeList* freeList) 55 51 { 56 handle.finishSweepKnowingHeapCellType(freeList, DestroyFunc());52 handle.finishSweepKnowingHeapCellType(freeList, JSSegmentedVariableObjectDestroyFunc()); 57 53 } 58 54 59 55 void JSSegmentedVariableObjectHeapCellType::destroy(VM& vm, JSCell* cell) 60 56 { 61 DestroyFunc()(vm, cell);57 JSSegmentedVariableObjectDestroyFunc()(vm, cell); 62 58 } 63 59 -
trunk/Source/JavaScriptCore/runtime/JSStringHeapCellType.cpp
r225314 r225464 32 32 namespace JSC { 33 33 34 namespace { 35 36 struct DestroyFunc { 34 struct JSStringDestroyFunc { 37 35 ALWAYS_INLINE void operator()(VM&, JSCell* cell) const 38 36 { … … 40 38 } 41 39 }; 42 43 } // anonymous namespace44 40 45 41 JSStringHeapCellType::JSStringHeapCellType() … … 54 50 void JSStringHeapCellType::finishSweep(MarkedBlock::Handle& handle, FreeList* freeList) 55 51 { 56 handle.finishSweepKnowingHeapCellType(freeList, DestroyFunc());52 handle.finishSweepKnowingHeapCellType(freeList, JSStringDestroyFunc()); 57 53 } 58 54 59 55 void JSStringHeapCellType::destroy(VM& vm, JSCell* cell) 60 56 { 61 DestroyFunc()(vm, cell);57 JSStringDestroyFunc()(vm, cell); 62 58 } 63 59 -
trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyCodeBlockHeapCellType.cpp
r225314 r225464 35 35 namespace JSC { 36 36 37 namespace { 38 39 struct DestroyFunc { 37 struct JSWebAssemblyCodeBlockDestroyFunc { 40 38 ALWAYS_INLINE void operator()(VM&, JSCell* cell) const 41 39 { … … 44 42 } 45 43 }; 46 47 } // anonymous namespace48 44 49 45 JSWebAssemblyCodeBlockHeapCellType::JSWebAssemblyCodeBlockHeapCellType() … … 58 54 void JSWebAssemblyCodeBlockHeapCellType::finishSweep(MarkedBlock::Handle& handle, FreeList* freeList) 59 55 { 60 handle.finishSweepKnowingHeapCellType(freeList, DestroyFunc());56 handle.finishSweepKnowingHeapCellType(freeList, JSWebAssemblyCodeBlockDestroyFunc()); 61 57 } 62 58 63 59 void JSWebAssemblyCodeBlockHeapCellType::destroy(VM& vm, JSCell* cell) 64 60 { 65 DestroyFunc()(vm, cell);61 JSWebAssemblyCodeBlockDestroyFunc()(vm, cell); 66 62 } 67 63
Note: See TracChangeset
for help on using the changeset viewer.