Changeset 166759 in webkit
- Timestamp:
- Apr 3, 2014 7:24:28 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r166756 r166759 1 2014-04-03 Mark Hahnenberg <mhahnenberg@apple.com> 2 3 All Heap::writeBarriers should be inline 4 https://bugs.webkit.org/show_bug.cgi?id=131197 5 6 Reviewed by Mark Lam. 7 8 One is in a JSCellInlines.h, another is in Heap.cpp. These are all critical 9 enough and small enough to belong in HeapInlines.h. Also added the proper 10 ENABLE(GGC) ifdefs to minimize the cost of C++ barriers for !ENABLE(GGC) builds. 11 12 * heap/Heap.cpp: 13 (JSC::Heap::writeBarrier): Deleted. 14 * heap/Heap.h: 15 * heap/HeapInlines.h: 16 (JSC::Heap::writeBarrier): 17 * runtime/JSCellInlines.h: 18 (JSC::Heap::writeBarrier): Deleted. 19 1 20 2014-04-03 Joseph Pecoraro <pecoraro@apple.com> 2 21 -
trunk/Source/JavaScriptCore/heap/Heap.cpp
r166678 r166759 1297 1297 } 1298 1298 1299 void Heap::writeBarrier(const JSCell* from)1300 {1301 #if ENABLE(GGC)1302 ASSERT_GC_OBJECT_LOOKS_VALID(const_cast<JSCell*>(from));1303 if (!from || !from->isMarked()) {1304 ASSERT(!from || !isMarked(from));1305 return;1306 }1307 ASSERT(isMarked(from));1308 addToRememberedSet(from);1309 #else1310 UNUSED_PARAM(from);1311 #endif1312 }1313 1314 1299 void Heap::flushWriteBarrierBuffer(JSCell* cell) 1315 1300 { -
trunk/Source/JavaScriptCore/heap/Heap.h
r166678 r166759 101 101 JS_EXPORT_PRIVATE void addToRememberedSet(const JSCell*); 102 102 static bool isWriteBarrierEnabled(); 103 JS_EXPORT_PRIVATEvoid writeBarrier(const JSCell*);103 void writeBarrier(const JSCell*); 104 104 void writeBarrier(const JSCell*, JSValue); 105 105 void writeBarrier(const JSCell*, JSCell*); -
trunk/Source/JavaScriptCore/heap/HeapInlines.h
r166375 r166759 29 29 #include "Heap.h" 30 30 #include "JSCell.h" 31 #include "Structure.h" 31 32 32 33 namespace JSC { … … 106 107 WriteBarrierCounters::countWriteBarrier(); 107 108 #endif 109 #if ENABLE(GGC) 108 110 if (!to.isCell()) 109 111 return; 110 112 writeBarrier(from, to.asCell()); 113 #else 114 UNUSED_PARAM(from); 115 UNUSED_PARAM(to); 116 #endif 117 } 118 119 inline void Heap::writeBarrier(const JSCell* from, JSCell* to) 120 { 121 #if ENABLE(WRITE_BARRIER_PROFILING) 122 WriteBarrierCounters::countWriteBarrier(); 123 #endif 124 #if ENABLE(GGC) 125 if (!from || !from->isMarked()) { 126 ASSERT(!from || !isMarked(from)); 127 return; 128 } 129 if (!to || to->isMarked()) { 130 ASSERT(!to || isMarked(to)); 131 return; 132 } 133 addToRememberedSet(from); 134 #else 135 UNUSED_PARAM(from); 136 UNUSED_PARAM(to); 137 #endif 138 } 139 140 inline void Heap::writeBarrier(const JSCell* from) 141 { 142 #if ENABLE(GGC) 143 ASSERT_GC_OBJECT_LOOKS_VALID(const_cast<JSCell*>(from)); 144 if (!from || !from->isMarked()) { 145 ASSERT(!from || !isMarked(from)); 146 return; 147 } 148 ASSERT(isMarked(from)); 149 addToRememberedSet(from); 150 #else 151 UNUSED_PARAM(from); 152 #endif 111 153 } 112 154 -
trunk/Source/JavaScriptCore/runtime/JSCellInlines.h
r165135 r166759 243 243 } 244 244 245 inline void Heap::writeBarrier(const JSCell* from, JSCell* to)246 {247 #if ENABLE(WRITE_BARRIER_PROFILING)248 WriteBarrierCounters::countWriteBarrier();249 #endif250 if (!from || !from->isMarked()) {251 ASSERT(!from || !isMarked(from));252 return;253 }254 if (!to || to->isMarked()) {255 ASSERT(!to || isMarked(to));256 return;257 }258 addToRememberedSet(from);259 }260 261 245 } // namespace JSC 262 246
Note: See TracChangeset
for help on using the changeset viewer.