X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/f9bf01c6616d5ddcf65b13b33cedf9e387ff7a63..14957cd040308e3eeec43d26bae5d76da13fcd85:/runtime/ArgList.cpp?ds=inline diff --git a/runtime/ArgList.cpp b/runtime/ArgList.cpp index ab2b5d7..c1aa9dd 100644 --- a/runtime/ArgList.cpp +++ b/runtime/ArgList.cpp @@ -23,6 +23,8 @@ #include "JSValue.h" #include "JSCell.h" +#include "JSObject.h" +#include "ScopeChain.h" using std::min; @@ -37,12 +39,12 @@ void ArgList::getSlice(int startIndex, ArgList& result) const result = ArgList(m_args + startIndex, m_argCount - startIndex); } -void MarkedArgumentBuffer::markLists(MarkStack& markStack, ListSet& markSet) +void MarkedArgumentBuffer::markLists(HeapRootVisitor& heapRootMarker, ListSet& markSet) { ListSet::iterator end = markSet.end(); for (ListSet::iterator it = markSet.begin(); it != end; ++it) { MarkedArgumentBuffer* list = *it; - markStack.appendValues(reinterpret_cast(list->m_buffer), list->m_size); + heapRootMarker.mark(reinterpret_cast(list->m_buffer), list->m_size); } } @@ -54,8 +56,8 @@ void MarkedArgumentBuffer::slowAppend(JSValue v) // our Vector's inline capacity, though, our values move to the // heap, where they do need explicit marking. if (!m_markSet) { - // We can only register for explicit marking once we know which heap - // is the current one, i.e., when a non-immediate value is appended. + // FIXME: Even if v is not a JSCell*, if previous values in the buffer + // are, then they won't be marked! if (Heap* heap = Heap::heap(v)) { ListSet& markSet = heap->markListSet(); markSet.add(this);