diff options
Diffstat (limited to 'JavaScriptCore/runtime/JSCell.h')
-rw-r--r-- | JavaScriptCore/runtime/JSCell.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/JavaScriptCore/runtime/JSCell.h b/JavaScriptCore/runtime/JSCell.h index 485ad2e..75ccf7f 100644 --- a/JavaScriptCore/runtime/JSCell.h +++ b/JavaScriptCore/runtime/JSCell.h @@ -55,7 +55,7 @@ namespace JSC { bool isString() const; bool isObject() const; virtual bool isGetterSetter() const; - bool inherits(const ClassInfo*) const; + virtual bool isObject(const ClassInfo*) const; virtual bool isAPIValueWrapper() const { return false; } Structure* structure() const; @@ -379,6 +379,30 @@ namespace JSC { if (cell->structure()->typeInfo().type() >= CompoundType) m_values.append(cell); } + + inline void MarkStack::drain() { + while (!m_markSets.isEmpty() || !m_values.isEmpty()) { + while ((!m_markSets.isEmpty()) && m_values.size() < 50) { + const MarkSet& current = m_markSets.removeLast(); + JSValue* ptr = current.m_values; + JSValue* end = current.m_end; + if (current.m_properties == NoNullValues) { + while (ptr != end) + append(*ptr++); + } else { + while (ptr != end) { + if (JSValue value = *ptr++) + append(value); + } + } + } + while (!m_values.isEmpty()) { + JSCell* current = m_values.removeLast(); + ASSERT(current->marked()); + current->markChildren(*this); + } + } + } } // namespace JSC #endif // JSCell_h |