当前位置: 首页>>代码示例>>C++>>正文


C++ ConservativeRoots类代码示例

本文整理汇总了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]);
}
开发者ID:13W,项目名称:phantomjs,代码行数:7,代码来源:MarkStack.cpp

示例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]);
}
开发者ID:ollie314,项目名称:webkit,代码行数:7,代码来源:SlotVisitor.cpp

示例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]);
}
开发者ID:3163504123,项目名称:phantomjs,代码行数:8,代码来源:SlotVisitor.cpp

示例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);
}
开发者ID:mu326668629,项目名称:webkit,代码行数:8,代码来源:MachineStackMarker.cpp

示例5: gatherFromOtherThread

void MachineThreads::gatherFromOtherThread(ConservativeRoots& conservativeRoots, Thread* thread)
{
    PlatformThreadRegisters regs;
    size_t regSize = getPlatformThreadRegisters(thread->platformThread, regs);

    conservativeRoots.add(static_cast<void*>(&regs), static_cast<void*>(reinterpret_cast<char*>(&regs) + regSize));

    void* stackPointer = otherThreadStackPointer(regs);
    void* stackBase = thread->stackBase;
    swapIfBackwards(stackPointer, stackBase);
    conservativeRoots.add(stackPointer, stackBase);

    freePlatformThreadRegisters(regs);
}
开发者ID:yoavweiss,项目名称:RespImg-WebKit,代码行数:14,代码来源:MachineStackMarker.cpp

示例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());
    }
}
开发者ID:0omega,项目名称:platform_external_webkit,代码行数:9,代码来源:RegisterFile.cpp

示例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()));
        }
    }
}
开发者ID:llelectronics,项目名称:lls-qtwebkit,代码行数:10,代码来源:VM.cpp

示例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 = &registers;
    void* registersEnd = reinterpret_cast<void*>(roundUpToMultipleOf<sizeof(void*)>(reinterpret_cast<uintptr_t>(&registers + 1)));
    swapIfBackwards(registersBegin, registersEnd);
    conservativeRoots.add(registersBegin, registersEnd);

    void* stackBegin = stackCurrent;
    void* stackEnd = wtfThreadData().stack().origin();
    swapIfBackwards(stackBegin, stackEnd);
    conservativeRoots.add(stackBegin, stackEnd);
}
开发者ID:yoavweiss,项目名称:RespImg-WebKit,代码行数:23,代码来源:MachineStackMarker.cpp

示例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);
}
开发者ID:biddyweb,项目名称:switch-oss,代码行数:17,代码来源:MachineStackMarker.cpp

示例10: gatherConservativeRoots

void RegisterFile::gatherConservativeRoots(ConservativeRoots& conservativeRoots)
{
    conservativeRoots.add(start(), end());
}
开发者ID:Irrelon,项目名称:iOS-JavaScript-Bridge,代码行数:4,代码来源:RegisterFile.cpp

示例11: gatherConservativeRoots

void JSStack::gatherConservativeRoots(ConservativeRoots& conservativeRoots, JITStubRoutineSet& jitStubRoutines, CodeBlockSet& codeBlocks)
{
    conservativeRoots.add(topOfStack() + 1, highAddress(), jitStubRoutines, codeBlocks);
}
开发者ID:WebKitNix,项目名称:webkitnix,代码行数:4,代码来源:JSStack.cpp

示例12: gatherConservativeRoots

void JSStack::gatherConservativeRoots(ConservativeRoots& conservativeRoots)
{
    conservativeRoots.add(getBaseOfStack(), getTopOfStack());
}
开发者ID:604339917,项目名称:JavaScriptCore-iOS-1,代码行数:4,代码来源:JSStack.cpp

示例13: gatherConservativeRoots

void JSStack::gatherConservativeRoots(ConservativeRoots& conservativeRoots, JITStubRoutineSet& jitStubRoutines, DFGCodeBlocks& dfgCodeBlocks)
{
    conservativeRoots.add(begin(), end(), jitStubRoutines, dfgCodeBlocks);
}
开发者ID:gobihun,项目名称:webkit,代码行数:4,代码来源:JSStack.cpp


注:本文中的ConservativeRoots类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。