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


C++ RawPointer函数代码示例

本文整理汇总了C++中RawPointer函数的典型用法代码示例。如果您正苦于以下问题:C++ RawPointer函数的具体用法?C++ RawPointer怎么用?C++ RawPointer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了RawPointer函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CodeBlockWithJITType

void Disassembler::dumpHeader(PrintStream& out, LinkBuffer& linkBuffer)
{
    out.print("Generated DFG JIT code for ", CodeBlockWithJITType(m_graph.m_codeBlock, JITCode::DFGJIT), ", instruction count = ", m_graph.m_codeBlock->instructionCount(), ":\n");
    out.print("    Optimized with execution counter = ", m_graph.m_profiledBlock->jitExecuteCounter(), "\n");
    out.print("    Source: ", m_graph.m_codeBlock->sourceCodeOnOneLine(), "\n");
    out.print("    Code at [", RawPointer(linkBuffer.debugAddress()), ", ", RawPointer(static_cast<char*>(linkBuffer.debugAddress()) + linkBuffer.debugSize()), "):\n");
}
开发者ID:Anthony-Biget,项目名称:openjfx,代码行数:7,代码来源:DFGDisassembler.cpp

示例2: dataLog

void CallLinkInfo::visitWeak(RepatchBuffer& repatchBuffer)
{
    if (isLinked()) {
        if (stub) {
            if (!Heap::isMarked(stub->executable())) {
                if (Options::verboseOSR()) {
                    dataLog(
                        "Clearing closure call from ", *repatchBuffer.codeBlock(), " to ",
                        stub->executable()->hashFor(specializationKind()),
                        ", stub routine ", RawPointer(stub.get()), ".\n");
                }
                unlink(repatchBuffer);
            }
        } else if (!Heap::isMarked(callee.get())) {
            if (Options::verboseOSR()) {
                dataLog(
                    "Clearing call from ", *repatchBuffer.codeBlock(), " to ",
                    RawPointer(callee.get()), " (",
                    callee.get()->executable()->hashFor(specializationKind()),
                    ").\n");
            }
            unlink(repatchBuffer);
        }
    }
    if (!!lastSeenCallee && !Heap::isMarked(lastSeenCallee.get()))
        lastSeenCallee.clear();
}
开发者ID:morpheus502,项目名称:webkit,代码行数:27,代码来源:CallLinkInfo.cpp

示例3: RawPointer

void GetterSetterAccessCase::dumpImpl(PrintStream& out, CommaPrinter& comma) const
{
    Base::dumpImpl(out, comma);
    out.print(comma, "customSlotBase = ", RawPointer(customSlotBase()));
    if (callLinkInfo())
        out.print(comma, "callLinkInfo = ", RawPointer(callLinkInfo()));
    out.print(comma, "customAccessor = ", RawPointer(m_customAccessor.opaque));
}
开发者ID:mjparme,项目名称:openjdk-jfx,代码行数:8,代码来源:GetterSetterAccessCase.cpp

示例4: RELEASE_ASSERT

void AutomaticThread::start(const LockHolder&)
{
    RELEASE_ASSERT(m_isRunning);

    RefPtr<AutomaticThread> preserveThisForThread = this;

    m_hasUnderlyingThread = true;

    ThreadIdentifier thread = createThread(
                                  "WTF::AutomaticThread",
    [=] () {
        if (verbose)
            dataLog(RawPointer(this), ": Running automatic thread!\n");
        ThreadScope threadScope(preserveThisForThread);

        if (!ASSERT_DISABLED) {
            LockHolder locker(*m_lock);
            ASSERT(!m_condition->contains(locker, this));
        }

        auto stop = [&] (const LockHolder&) {
            m_isRunning = false;
            m_isRunningCondition.notifyAll();
        };

        for (;;) {
            {
                LockHolder locker(*m_lock);
                for (;;) {
                    PollResult result = poll(locker);
                    if (result == PollResult::Work)
                        break;
                    if (result == PollResult::Stop)
                        return stop(locker);
                    RELEASE_ASSERT(result == PollResult::Wait);
                    // Shut the thread down after one second.
                    bool awokenByNotify =
                        m_condition->m_condition.waitFor(*m_lock, 1_s);
                    if (!awokenByNotify) {
                        if (verbose)
                            dataLog(RawPointer(this), ": Going to sleep!\n");
                        m_condition->add(locker, this);
                        return;
                    }
                }
            }

            WorkResult result = work();
            if (result == WorkResult::Stop) {
                LockHolder locker(*m_lock);
                return stop(locker);
            }
            RELEASE_ASSERT(result == WorkResult::Continue);
        }
    });
    detachThread(thread);
}
开发者ID:eocanha,项目名称:webkit,代码行数:57,代码来源:AutomaticThread.cpp

示例5: logSanitizeStack

void logSanitizeStack(VM* vm)
{
    if (Options::verboseSanitizeStack() && vm->topCallFrame) {
        int dummy;
        dataLog(
            "Sanitizing stack with top call frame at ", RawPointer(vm->topCallFrame),
            ", current stack pointer at ", RawPointer(&dummy), ", in ",
            pointerDump(vm->topCallFrame->codeBlock()), " and last code origin = ",
            vm->topCallFrame->codeOrigin(), "\n");
    }
}
开发者ID:llelectronics,项目名称:lls-qtwebkit,代码行数:11,代码来源:VM.cpp

示例6: RawPointer

void MacroAssemblerCodePtr::dumpWithName(const char* name, PrintStream& out) const
{
    if (!m_value) {
        out.print(name, "(null)");
        return;
    }
    if (executableAddress() == dataLocation()) {
        out.print(name, "(", RawPointer(executableAddress()), ")");
        return;
    }
    out.print(name, "(executable = ", RawPointer(executableAddress()), ", dataLocation = ", RawPointer(dataLocation()), ")");
}
开发者ID:mjparme,项目名称:openjdk-jfx,代码行数:12,代码来源:MacroAssemblerCodeRef.cpp

示例7: genericUnwind

void genericUnwind(VM* vm, ExecState* callFrame, UnwindStart unwindStart)
{
    if (Options::breakOnThrow()) {
        CodeBlock* codeBlock = callFrame->codeBlock();
        if (codeBlock)
            dataLog("In call frame ", RawPointer(callFrame), " for code block ", *codeBlock, "\n");
        else
            dataLog("In call frame ", RawPointer(callFrame), " with null CodeBlock\n");
        CRASH();
    }
    
    ExecState* shadowChickenTopFrame = callFrame;
    if (unwindStart == UnwindFromCallerFrame) {
        VMEntryFrame* topVMEntryFrame = vm->topVMEntryFrame;
        shadowChickenTopFrame = callFrame->callerFrame(topVMEntryFrame);
    }
    vm->shadowChicken().log(*vm, shadowChickenTopFrame, ShadowChicken::Packet::throwPacket());
    
    Exception* exception = vm->exception();
    RELEASE_ASSERT(exception);
    HandlerInfo* handler = vm->interpreter->unwind(*vm, callFrame, exception, unwindStart); // This may update callFrame.

    void* catchRoutine;
    Instruction* catchPCForInterpreter = 0;
    if (handler) {
        // handler->target is meaningless for getting a code offset when catching
        // the exception in a DFG/FTL frame. This bytecode target offset could be
        // something that's in an inlined frame, which means an array access
        // with this bytecode offset in the machine frame is utterly meaningless
        // and can cause an overflow. OSR exit properly exits to handler->target
        // in the proper frame.
        if (!JITCode::isOptimizingJIT(callFrame->codeBlock()->jitType()))
            catchPCForInterpreter = &callFrame->codeBlock()->instructions()[handler->target];
#if ENABLE(JIT)
        catchRoutine = handler->nativeCode.executableAddress();
#else
        catchRoutine = catchPCForInterpreter->u.pointer;
#endif
    } else
        catchRoutine = LLInt::getCodePtr(handleUncaughtException);
    
    ASSERT(bitwise_cast<uintptr_t>(callFrame) < bitwise_cast<uintptr_t>(vm->topVMEntryFrame));

    vm->callFrameForCatch = callFrame;
    vm->targetMachinePCForThrow = catchRoutine;
    vm->targetInterpreterPCForThrow = catchPCForInterpreter;
    
    RELEASE_ASSERT(catchRoutine);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:49,代码来源:JITExceptions.cpp

示例8: generateConditionsForInstanceOf

ObjectPropertyConditionSet generateConditionsForInstanceOf(
    VM& vm, JSCell* owner, ExecState* exec, Structure* headStructure, JSObject* prototype,
    bool shouldHit)
{
    bool didHit = false;
    if (ObjectPropertyConditionSetInternal::verbose)
        dataLog("Searching for prototype ", JSValue(prototype), " starting with structure ", RawPointer(headStructure), " with shouldHit = ", shouldHit, "\n");
    ObjectPropertyConditionSet result = generateConditions(
        vm, exec->lexicalGlobalObject(), headStructure, shouldHit ? prototype : nullptr,
        [&] (Vector<ObjectPropertyCondition>& conditions, JSObject* object) -> bool {
            if (ObjectPropertyConditionSetInternal::verbose)
                dataLog("Encountered object: ", RawPointer(object), "\n");
            if (object == prototype) {
                RELEASE_ASSERT(shouldHit);
                didHit = true;
                return true;
            }

            Structure* structure = object->structure(vm);
            if (structure->hasPolyProto())
                return false;
            conditions.append(
                ObjectPropertyCondition::hasPrototype(
                    vm, owner, object, structure->storedPrototypeObject()));
            return true;
        });
    if (result.isValid()) {
        if (ObjectPropertyConditionSetInternal::verbose)
            dataLog("didHit = ", didHit, ", shouldHit = ", shouldHit, "\n");
        RELEASE_ASSERT(didHit == shouldHit);
    }
    return result;
}
开发者ID:wolfviking0,项目名称:webcl-webkit,代码行数:33,代码来源:ObjectPropertyConditionSet.cpp

示例9: codeBlockFromArg

static CodeBlock* codeBlockFromArg(ExecState* exec)
{
    VM& vm = exec->vm();
    if (exec->argumentCount() < 1)
        return nullptr;

    JSValue value = exec->uncheckedArgument(0);
    CodeBlock* candidateCodeBlock = nullptr;
    if (value.isCell()) {
        JSFunction* func = jsDynamicCast<JSFunction*>(vm, value.asCell());
        if (func) {
            if (func->isHostFunction())
                candidateCodeBlock = nullptr;
            else
                candidateCodeBlock = func->jsExecutable()->eitherCodeBlock();
        }
    } else if (value.isDouble()) {
        // If the value is a double, it may be an encoded CodeBlock* that came from
        // $vm.codeBlockForFrame(). We'll treat it as a candidate codeBlock and check if it's
        // valid below before using.
        candidateCodeBlock = reinterpret_cast<CodeBlock*>(bitwise_cast<uint64_t>(value.asDouble()));
    }

    if (candidateCodeBlock && JSDollarVMPrototype::isValidCodeBlock(exec, candidateCodeBlock))
        return candidateCodeBlock;

    if (candidateCodeBlock)
        dataLog("Invalid codeBlock: ", RawPointer(candidateCodeBlock), " ", value, "\n");
    else
        dataLog("Invalid codeBlock: ", value, "\n");
    return nullptr;
}
开发者ID:mjparme,项目名称:openjdk-jfx,代码行数:32,代码来源:JSDollarVMPrototype.cpp

示例10: install

void AdaptiveInferredPropertyValueWatchpoint::fire(const FireDetail& detail)
{
    // One of the watchpoints fired, but the other one didn't. Make sure that neither of them are
    // in any set anymore. This simplifies things by allowing us to reinstall the watchpoints
    // wherever from scratch.
    if (m_structureWatchpoint.isOnList())
        m_structureWatchpoint.remove();
    if (m_propertyWatchpoint.isOnList())
        m_propertyWatchpoint.remove();
    
    if (m_key.isWatchable(PropertyCondition::EnsureWatchability)) {
        install();
        return;
    }
    
    if (DFG::shouldShowDisassembly()) {
        dataLog(
            "Firing watchpoint ", RawPointer(this), " (", m_key, ") on ", *m_codeBlock, "\n");
    }
    
    StringPrintStream out;
    out.print("Adaptation of ", m_key, " failed: ", detail);
    
    StringFireDetail stringDetail(out.toCString().data());
    
    m_codeBlock->jettison(
        Profiler::JettisonDueToUnprofiledWatchpoint, CountReoptimization, &stringDetail);
}
开发者ID:EQ4,项目名称:webkit-mips,代码行数:28,代码来源:DFGAdaptiveInferredPropertyValueWatchpoint.cpp

示例11: ASSERT

void HeapSnapshot::finalize()
{
    ASSERT(!m_finalized);
    m_finalized = true;

    // Nodes are appended to the snapshot in identifier order.
    // Now that we have the complete list of nodes we will sort
    // them in a different order. Remember the range of identifiers
    // in this snapshot.
    if (!isEmpty()) {
        m_firstObjectIdentifier = m_nodes.first().identifier;
        m_lastObjectIdentifier = m_nodes.last().identifier;
    }

    std::sort(m_nodes.begin(), m_nodes.end(), [] (const HeapSnapshotNode& a, const HeapSnapshotNode& b) {
        return a.cell < b.cell;
    });

#ifndef NDEBUG
    // Assert there are no duplicates or nullptr cells.
    JSCell* previousCell = nullptr;
    for (auto& node : m_nodes) {
        ASSERT(node.cell);
        ASSERT(!(reinterpret_cast<intptr_t>(node.cell) & CellToSweepTag));
        if (node.cell == previousCell) {
            dataLog("Seeing same cell twice: ", RawPointer(previousCell), "\n");
            ASSERT(node.cell != previousCell);
        }
        previousCell = node.cell;
    }
#endif
}
开发者ID:ollie314,项目名称:webkit,代码行数:32,代码来源:HeapSnapshot.cpp

示例12: dataLog

void CodeBlockJettisoningWatchpoint::fireInternal(VM&, const FireDetail& detail)
{
    if (DFG::shouldDumpDisassembly())
        dataLog("Firing watchpoint ", RawPointer(this), " on ", *m_codeBlock, "\n");

    m_codeBlock->jettison(Profiler::JettisonDueToUnprofiledWatchpoint, CountReoptimization, &detail);
}
开发者ID:wolfviking0,项目名称:webcl-webkit,代码行数:7,代码来源:CodeBlockJettisoningWatchpoint.cpp

示例13: genericUnwind

void genericUnwind(VM* vm, ExecState* callFrame, JSValue exceptionValue)
{
    if (Options::breakOnThrow()) {
        dataLog("In call frame ", RawPointer(callFrame), " for code block ", *callFrame->codeBlock(), "\n");
        CRASH();
    }
    
    RELEASE_ASSERT(exceptionValue);
    VMEntryFrame* vmEntryFrame = vm->topVMEntryFrame;
    HandlerInfo* handler = vm->interpreter->unwind(vmEntryFrame, callFrame, exceptionValue); // This may update vmEntryFrame and callFrame.

    void* catchRoutine;
    Instruction* catchPCForInterpreter = 0;
    if (handler) {
        catchPCForInterpreter = &callFrame->codeBlock()->instructions()[handler->target];
#if ENABLE(JIT)
        catchRoutine = handler->nativeCode.executableAddress();
#else
        catchRoutine = catchPCForInterpreter->u.pointer;
#endif
    } else
        catchRoutine = LLInt::getCodePtr(handleUncaughtException);
    
    vm->vmEntryFrameForThrow = vmEntryFrame;
    vm->callFrameForThrow = callFrame;
    vm->targetMachinePCForThrow = catchRoutine;
    vm->targetInterpreterPCForThrow = catchPCForInterpreter;
    
    RELEASE_ASSERT(catchRoutine);
}
开发者ID:AndriyKalashnykov,项目名称:webkit,代码行数:30,代码来源:JITExceptions.cpp

示例14: computeUpdatedPrediction

CString ArrayProfile::briefDescription(CodeBlock* codeBlock)
{
    computeUpdatedPrediction(codeBlock);
    
    StringPrintStream out;
    
    bool hasPrinted = false;
    
    if (m_observedArrayModes) {
        if (hasPrinted)
            out.print(", ");
        out.print(ArrayModesDump(m_observedArrayModes));
        hasPrinted = true;
    }
    
    if (structureIsPolymorphic()) {
        if (hasPrinted)
            out.print(", ");
        out.print("struct = TOP");
        hasPrinted = true;
    } else if (m_expectedStructure) {
        if (hasPrinted)
            out.print(", ");
        out.print("struct = ", RawPointer(m_expectedStructure));
        hasPrinted = true;
    }
    
    if (m_mayStoreToHole) {
        if (hasPrinted)
            out.print(", ");
        out.print("Hole");
        hasPrinted = true;
    }
    
    if (m_outOfBounds) {
        if (hasPrinted)
            out.print(", ");
        out.print("OutOfBounds");
        hasPrinted = true;
    }
    
    if (m_mayInterceptIndexedAccesses) {
        if (hasPrinted)
            out.print(", ");
        out.print("Intercept");
        hasPrinted = true;
    }
    
    if (m_usesOriginalArrayStructures) {
        if (hasPrinted)
            out.print(", ");
        out.print("Original");
        hasPrinted = true;
    }
    
    UNUSED_PARAM(hasPrinted);
    
    return out.toCString();
}
开发者ID:Anthony-Biget,项目名称:openjfx,代码行数:59,代码来源:ArrayProfile.cpp

示例15: dataLog

void BlockDirectory::stopAllocating()
{
    if (false)
        dataLog(RawPointer(this), ": BlockDirectory::stopAllocating!\n");
    m_localAllocators.forEach(
        [&] (LocalAllocator* allocator) {
            allocator->stopAllocating();
        });
}
开发者ID:wolfviking0,项目名称:webcl-webkit,代码行数:9,代码来源:BlockDirectory.cpp


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