Changeset 286033 in webkit
- Timestamp:
- Nov 18, 2021, 3:09:07 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 7 edited
-
ChangeLog (modified) (1 diff)
-
heap/BlockDirectory.h (modified) (2 diffs)
-
heap/HeapCellType.h (modified) (2 diffs)
-
heap/MarkedBlock.h (modified) (3 diffs)
-
heap/PreciseAllocation.h (modified) (1 diff)
-
heap/Subspace.h (modified) (2 diffs)
-
heap/SubspaceInlines.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r286030 r286033 1 2021-11-18 Mark Lam <mark.lam@apple.com> 2 3 CellAttributes should be returned by value. 4 https://bugs.webkit.org/show_bug.cgi?id=233335 5 rdar://85568435 6 7 Reviewed by Yusuke Suzuki. 8 9 CellAttributes fits in 16 bits, and client code never modifies returned CellAttributes 10 values. Hence, there is no reason to return them by reference. 11 12 Also fixed a bit-rotted comment in SubSpace.h. 13 14 * heap/BlockDirectory.h: 15 (JSC::BlockDirectory::attributes const): 16 * heap/HeapCellType.h: 17 (JSC::HeapCellType::attributes const): 18 * heap/MarkedBlock.h: 19 (JSC::MarkedBlock::Handle::attributes const): 20 (JSC::MarkedBlock::attributes const): 21 * heap/PreciseAllocation.h: 22 (JSC::PreciseAllocation::attributes const): 23 * heap/Subspace.h: 24 * heap/SubspaceInlines.h: 25 (JSC::Subspace::attributes const): 26 1 27 2021-11-18 Robin Morisset <rmorisset@apple.com> 2 28 -
trunk/Source/JavaScriptCore/heap/BlockDirectory.h
r278093 r286033 1 1 /* 2 * Copyright (C) 2012-20 18Apple Inc. All rights reserved.2 * Copyright (C) 2012-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 75 75 void assertNoUnswept(); 76 76 size_t cellSize() const { return m_cellSize; } 77 const CellAttributes &attributes() const { return m_attributes; }77 const CellAttributes attributes() const { return m_attributes; } 78 78 bool needsDestruction() const { return m_attributes.destruction == NeedsDestruction; } 79 79 DestructionMode destruction() const { return m_attributes.destruction; } -
trunk/Source/JavaScriptCore/heap/HeapCellType.h
r226822 r286033 1 1 /* 2 * Copyright (C) 2017 Apple Inc. All rights reserved.2 * Copyright (C) 2017-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 37 37 JS_EXPORT_PRIVATE virtual ~HeapCellType(); 38 38 39 const CellAttributes &attributes() const { return m_attributes; }39 const CellAttributes attributes() const { return m_attributes; } 40 40 41 41 // The purpose of overriding this is to specialize the sweep for your destructors. This won't -
trunk/Source/JavaScriptCore/heap/MarkedBlock.h
r280195 r286033 162 162 inline unsigned cellsPerBlock(); 163 163 164 const CellAttributes &attributes() const;164 const CellAttributes attributes() const; 165 165 DestructionMode destruction() const; 166 166 bool needsDestruction() const; … … 348 348 349 349 size_t cellSize(); 350 const CellAttributes &attributes() const;350 const CellAttributes attributes() const; 351 351 352 352 bool hasAnyMarked() const; … … 512 512 } 513 513 514 inline const CellAttributes &MarkedBlock::Handle::attributes() const514 inline const CellAttributes MarkedBlock::Handle::attributes() const 515 515 { 516 516 return m_attributes; 517 517 } 518 518 519 inline const CellAttributes &MarkedBlock::attributes() const519 inline const CellAttributes MarkedBlock::attributes() const 520 520 { 521 521 return handle().attributes(); -
trunk/Source/JavaScriptCore/heap/PreciseAllocation.h
r272825 r286033 122 122 } 123 123 124 const CellAttributes &attributes() const { return m_attributes; }124 const CellAttributes attributes() const { return m_attributes; } 125 125 126 126 Dependency aboutToMark(HeapVersion) { return Dependency(); } -
trunk/Source/JavaScriptCore/heap/Subspace.h
r273138 r286033 40 40 // The idea of subspaces is that you can provide some custom behavior for your objects if you 41 41 // allocate them from a custom Subspace in which you override some of the virtual methods. This 42 // class is the baseclass of Subspaces. Usually you will use either Subspace or FixedSizeSubspace.42 // class is the baseclass of all subspaces e.g. CompleteSubspace, IsoSubspace. 43 43 class Subspace { 44 44 WTF_MAKE_NONCOPYABLE(Subspace); … … 51 51 MarkedSpace& space() const { return m_space; } 52 52 53 const CellAttributes &attributes() const;53 const CellAttributes attributes() const; 54 54 HeapCellType* heapCellType() const { return m_heapCellType; } 55 55 AlignedMemoryAllocator* alignedMemoryAllocator() const { return m_alignedMemoryAllocator; } -
trunk/Source/JavaScriptCore/heap/SubspaceInlines.h
r277909 r286033 153 153 } 154 154 155 inline const CellAttributes &Subspace::attributes() const155 inline const CellAttributes Subspace::attributes() const 156 156 { 157 157 return m_heapCellType->attributes();
Note:
See TracChangeset
for help on using the changeset viewer.