本文整理汇总了C++中ConservativeRoots类的典型用法代码示例。如果您正苦于以下问题:C++ ConservativeRoots类的具体用法?C++ ConservativeRoots怎么用?C++ ConservativeRoots使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ConservativeRoots类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: append
void MarkStack::append(ConservativeRoots& conservativeRoots)
{
JSCell** roots = conservativeRoots.roots();
size_t size = conservativeRoots.size();
for (size_t i = 0; i < size; ++i)
internalAppend(roots[i]);
}
示例2: append
void SlotVisitor::append(ConservativeRoots& conservativeRoots)
{
HeapCell** roots = conservativeRoots.roots();
size_t size = conservativeRoots.size();
for (size_t i = 0; i < size; ++i)
appendJSCellOrAuxiliary(roots[i]);
}
示例3: append
void SlotVisitor::append(ConservativeRoots& conservativeRoots)
{
StackStats::probe();
JSCell** roots = conservativeRoots.roots();
size_t size = conservativeRoots.size();
for (size_t i = 0; i < size; ++i)
internalAppend(roots[i]);
}
示例4: gatherFromCurrentThread
void MachineThreads::gatherFromCurrentThread(ConservativeRoots& conservativeRoots, JITStubRoutineSet& jitStubRoutines, CodeBlockSet& codeBlocks, void* stackOrigin, void* stackTop, RegisterState& calleeSavedRegisters)
{
void* registersBegin = &calleeSavedRegisters;
void* registersEnd = reinterpret_cast<void*>(roundUpToMultipleOf<sizeof(void*)>(reinterpret_cast<uintptr_t>(&calleeSavedRegisters + 1)));
conservativeRoots.add(registersBegin, registersEnd, jitStubRoutines, codeBlocks);
conservativeRoots.add(stackTop, stackOrigin, jitStubRoutines, codeBlocks);
}
示例5: gatherFromOtherThread
void MachineThreads::gatherFromOtherThread(ConservativeRoots& conservativeRoots, Thread* thread)
{
PlatformThreadRegisters regs;
size_t regSize = getPlatformThreadRegisters(thread->platformThread, regs);
conservativeRoots.add(static_cast<void*>(®s), static_cast<void*>(reinterpret_cast<char*>(®s) + regSize));
void* stackPointer = otherThreadStackPointer(regs);
void* stackBase = thread->stackBase;
swapIfBackwards(stackPointer, stackBase);
conservativeRoots.add(stackPointer, stackBase);
freePlatformThreadRegisters(regs);
}
示例6: gatherConservativeRoots
void RegisterFile::gatherConservativeRoots(ConservativeRoots& conservativeRoots)
{
for (Register* it = start(); it != end(); ++it) {
JSValue v = it->jsValue();
if (!v.isCell())
continue;
conservativeRoots.add(v.asCell());
}
}
示例7: gatherConservativeRoots
void VM::gatherConservativeRoots(ConservativeRoots& conservativeRoots)
{
for (size_t i = 0; i < scratchBuffers.size(); i++) {
ScratchBuffer* scratchBuffer = scratchBuffers[i];
if (scratchBuffer->activeLength()) {
void* bufferStart = scratchBuffer->dataBuffer();
conservativeRoots.add(bufferStart, static_cast<void*>(static_cast<char*>(bufferStart) + scratchBuffer->activeLength()));
}
}
}
示例8: gatherFromCurrentThread
void MachineThreads::gatherFromCurrentThread(ConservativeRoots& conservativeRoots, void* stackCurrent)
{
// setjmp forces volatile registers onto the stack
jmp_buf registers REGISTER_BUFFER_ALIGNMENT;
#if COMPILER(MSVC)
#pragma warning(push)
#pragma warning(disable: 4611)
#endif
setjmp(registers);
#if COMPILER(MSVC)
#pragma warning(pop)
#endif
void* registersBegin = ®isters;
void* registersEnd = reinterpret_cast<void*>(roundUpToMultipleOf<sizeof(void*)>(reinterpret_cast<uintptr_t>(®isters + 1)));
swapIfBackwards(registersBegin, registersEnd);
conservativeRoots.add(registersBegin, registersEnd);
void* stackBegin = stackCurrent;
void* stackEnd = wtfThreadData().stack().origin();
swapIfBackwards(stackBegin, stackEnd);
conservativeRoots.add(stackBegin, stackEnd);
}
示例9: gatherConservativeRoots
void MachineThreads::gatherConservativeRoots(ConservativeRoots& conservativeRoots, JITStubRoutineSet& jitStubRoutines, CodeBlockSet& codeBlocks, void* stackOrigin, void* stackTop, RegisterState& calleeSavedRegisters)
{
gatherFromCurrentThread(conservativeRoots, jitStubRoutines, codeBlocks, stackOrigin, stackTop, calleeSavedRegisters);
size_t size;
size_t capacity = 0;
void* buffer = nullptr;
MutexLocker lock(m_registeredThreadsMutex);
while (!tryCopyOtherThreadStacks(lock, buffer, capacity, &size))
growBuffer(size, &buffer, &capacity);
if (!buffer)
return;
conservativeRoots.add(buffer, static_cast<char*>(buffer) + size, jitStubRoutines, codeBlocks);
fastFree(buffer);
}
示例10: gatherConservativeRoots
void RegisterFile::gatherConservativeRoots(ConservativeRoots& conservativeRoots)
{
conservativeRoots.add(start(), end());
}
示例11: gatherConservativeRoots
void JSStack::gatherConservativeRoots(ConservativeRoots& conservativeRoots, JITStubRoutineSet& jitStubRoutines, CodeBlockSet& codeBlocks)
{
conservativeRoots.add(topOfStack() + 1, highAddress(), jitStubRoutines, codeBlocks);
}
示例12: gatherConservativeRoots
void JSStack::gatherConservativeRoots(ConservativeRoots& conservativeRoots)
{
conservativeRoots.add(getBaseOfStack(), getTopOfStack());
}
示例13: gatherConservativeRoots
void JSStack::gatherConservativeRoots(ConservativeRoots& conservativeRoots, JITStubRoutineSet& jitStubRoutines, DFGCodeBlocks& dfgCodeBlocks)
{
conservativeRoots.add(begin(), end(), jitStubRoutines, dfgCodeBlocks);
}