void Arguments::markChildren(MarkStack& markStack) { JSObject::markChildren(markStack); if (d->registerArray) markStack.appendValues(reinterpret_cast<JSValue*>(d->registerArray.get()), d->numParameters); if (d->extraArguments) { unsigned numExtraArguments = d->numArguments - d->numParameters; markStack.appendValues(reinterpret_cast<JSValue*>(d->extraArguments), numExtraArguments); } markStack.append(d->callee); if (d->activation) markStack.append(d->activation); }
void MarkedArgumentBuffer::markLists(MarkStack& markStack, ListSet& markSet) { ListSet::iterator end = markSet.end(); for (ListSet::iterator it = markSet.begin(); it != end; ++it) { MarkedArgumentBuffer* list = *it; markStack.appendValues(reinterpret_cast<JSValue*>(list->m_buffer), list->m_size); } }
void JSActivation::markChildren(MarkStack& markStack) { Base::markChildren(markStack); Register* registerArray = d()->registerArray.get(); if (!registerArray) return; size_t numParametersMinusThis = d()->functionExecutable->parameterCount(); size_t count = numParametersMinusThis; markStack.appendValues(registerArray, count); size_t numVars = d()->functionExecutable->variableCount(); // Skip the call frame, which sits between the parameters and vars. markStack.appendValues(registerArray + count + RegisterFile::CallFrameHeaderSize, numVars, MayContainNullValues); }
void JSActivation::markChildren(MarkStack& markStack) { Base::markChildren(markStack); markStack.append(&m_functionExecutable); // No need to mark our registers if they're still in the RegisterFile. WriteBarrier<Unknown>* registerArray = m_registerArray.get(); if (!registerArray) return; size_t numParametersMinusThis = m_functionExecutable->parameterCount(); size_t count = numParametersMinusThis; markStack.appendValues(registerArray, count); size_t numVars = m_functionExecutable->capturedVariableCount(); // Skip the call frame, which sits between the parameters and vars. markStack.appendValues(registerArray + count + RegisterFile::CallFrameHeaderSize, numVars, MayContainNullValues); }
void JSPropertyNameIterator::markChildren(MarkStack& markStack) { markStack.appendValues(m_jsStrings.get(), m_jsStringsSize, MayContainNullValues); }
void JSGlobalObject::markChildren(MarkStack& markStack) { JSVariableObject::markChildren(markStack); HashSet<GlobalCodeBlock*>::const_iterator end = codeBlocks().end(); for (HashSet<GlobalCodeBlock*>::const_iterator it = codeBlocks().begin(); it != end; ++it) (*it)->markAggregate(markStack); RegisterFile& registerFile = globalData()->interpreter->registerFile(); if (registerFile.globalObject() == this) registerFile.markGlobals(markStack, &globalData()->heap); markIfNeeded(markStack, d()->regExpConstructor); markIfNeeded(markStack, d()->errorConstructor); markIfNeeded(markStack, d()->evalErrorConstructor); markIfNeeded(markStack, d()->rangeErrorConstructor); markIfNeeded(markStack, d()->referenceErrorConstructor); markIfNeeded(markStack, d()->syntaxErrorConstructor); markIfNeeded(markStack, d()->typeErrorConstructor); markIfNeeded(markStack, d()->URIErrorConstructor); markIfNeeded(markStack, d()->evalFunction); markIfNeeded(markStack, d()->callFunction); markIfNeeded(markStack, d()->applyFunction); markIfNeeded(markStack, d()->objectPrototype); markIfNeeded(markStack, d()->functionPrototype); markIfNeeded(markStack, d()->arrayPrototype); markIfNeeded(markStack, d()->booleanPrototype); markIfNeeded(markStack, d()->stringPrototype); markIfNeeded(markStack, d()->numberPrototype); markIfNeeded(markStack, d()->datePrototype); markIfNeeded(markStack, d()->regExpPrototype); markIfNeeded(markStack, d()->methodCallDummy); markIfNeeded(markStack, d()->errorStructure); markIfNeeded(markStack, d()->argumentsStructure); markIfNeeded(markStack, d()->arrayStructure); markIfNeeded(markStack, d()->booleanObjectStructure); markIfNeeded(markStack, d()->callbackConstructorStructure); markIfNeeded(markStack, d()->callbackFunctionStructure); markIfNeeded(markStack, d()->callbackObjectStructure); markIfNeeded(markStack, d()->dateStructure); markIfNeeded(markStack, d()->emptyObjectStructure); markIfNeeded(markStack, d()->errorStructure); markIfNeeded(markStack, d()->functionStructure); markIfNeeded(markStack, d()->numberObjectStructure); markIfNeeded(markStack, d()->prototypeFunctionStructure); markIfNeeded(markStack, d()->regExpMatchesArrayStructure); markIfNeeded(markStack, d()->regExpStructure); markIfNeeded(markStack, d()->stringObjectStructure); // No need to mark the other structures, because their prototypes are all // guaranteed to be referenced elsewhere. Register* registerArray = d()->registerArray.get(); if (!registerArray) return; size_t size = d()->registerArraySize; markStack.appendValues(reinterpret_cast<JSValue*>(registerArray), size); }