Title: [91218] trunk/Source/_javascript_Core
- Revision
- 91218
- Author
- [email protected]
- Date
- 2011-07-18 15:55:47 -0700 (Mon, 18 Jul 2011)
Log Message
JSC GC lazy sweep does not inline the common cases of cell destruction.
https://bugs.webkit.org/show_bug.cgi?id=64745
Patch by Filip Pizlo <[email protected]> on 2011-07-18
Reviewed by Oliver Hunt.
This inlines the case of JSFinalObject destruction.
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::lazySweep):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (91217 => 91218)
--- trunk/Source/_javascript_Core/ChangeLog 2011-07-18 22:49:38 UTC (rev 91217)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-07-18 22:55:47 UTC (rev 91218)
@@ -1,3 +1,15 @@
+2011-07-18 Filip Pizlo <[email protected]>
+
+ JSC GC lazy sweep does not inline the common cases of cell destruction.
+ https://bugs.webkit.org/show_bug.cgi?id=64745
+
+ Reviewed by Oliver Hunt.
+
+ This inlines the case of JSFinalObject destruction.
+
+ * heap/MarkedBlock.cpp:
+ (JSC::MarkedBlock::lazySweep):
+
2011-07-18 Oliver Hunt <[email protected]>
Interpreter build-fix
Modified: trunk/Source/_javascript_Core/heap/MarkedBlock.cpp (91217 => 91218)
--- trunk/Source/_javascript_Core/heap/MarkedBlock.cpp 2011-07-18 22:49:38 UTC (rev 91217)
+++ trunk/Source/_javascript_Core/heap/MarkedBlock.cpp 2011-07-18 22:55:47 UTC (rev 91218)
@@ -86,12 +86,18 @@
// This is fine, since the allocation code makes no assumptions about the
// order of the free list.
+ void* jsFinalObjectVPtr = m_heap->globalData()->jsFinalObjectVPtr;
+
FreeCell* result = 0;
for (size_t i = firstAtom(); i < m_endAtom; i += m_atomsPerCell) {
if (!m_marks.testAndSet(i)) {
JSCell* cell = reinterpret_cast<JSCell*>(&atoms()[i]);
- cell->~JSCell();
+ if (cell->vptr() == jsFinalObjectVPtr) {
+ JSFinalObject* object = reinterpret_cast<JSFinalObject*>(cell);
+ object->JSFinalObject::~JSFinalObject();
+ } else
+ cell->~JSCell();
FreeCell* freeCell = reinterpret_cast<FreeCell*>(cell);
freeCell->next = result;
result = freeCell;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes