Changeset 93698 in webkit for trunk/Source/JavaScriptCore/heap/Heap.h
- Timestamp:
- Aug 24, 2011, 2:50:40 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/heap/Heap.h
r92224 r93698 29 29 #include "NewSpace.h" 30 30 #include "SlotVisitor.h" 31 #include "WriteBarrierSupport.h" 31 32 #include <wtf/Forward.h> 32 33 #include <wtf/HashCountedSet.h> … … 130 131 131 132 enum AllocationEffort { AllocationMustSucceed, AllocationCanFail }; 133 134 #if ENABLE(GGC) 135 static void writeBarrierFastCase(const JSCell* owner, JSCell*); 136 #endif 132 137 133 138 bool isValidAllocation(size_t); … … 237 242 238 243 #if ENABLE(GGC) 239 inline void Heap::writeBarrier (const JSCell* owner, JSCell* cell)244 inline void Heap::writeBarrierFastCase(const JSCell* owner, JSCell* cell) 240 245 { 241 246 if (MarkedBlock::blockFor(owner)->inNewSpace()) … … 244 249 } 245 250 251 inline void Heap::writeBarrier(const JSCell* owner, JSCell* cell) 252 { 253 WriteBarrierCounters::countWriteBarrier(); 254 writeBarrierFastCase(owner, cell); 255 } 256 246 257 inline void Heap::writeBarrier(const JSCell* owner, JSValue value) 247 258 { 259 WriteBarrierCounters::countWriteBarrier(); 248 260 if (!value) 249 261 return; 250 262 if (!value.isCell()) 251 263 return; 252 writeBarrier(owner, value.asCell()); 253 } 254 264 writeBarrierFastCase(owner, value.asCell()); 265 } 255 266 #else 256 267 257 268 inline void Heap::writeBarrier(const JSCell*, JSCell*) 258 269 { 270 WriteBarrierCounters::countWriteBarrier(); 259 271 } 260 272 261 273 inline void Heap::writeBarrier(const JSCell*, JSValue) 262 274 { 275 WriteBarrierCounters::countWriteBarrier(); 263 276 } 264 277 #endif
Note:
See TracChangeset
for help on using the changeset viewer.