Exemplo n.º 1
0
void Debugger::recompileAllJSFunctions(JSGlobalData* globalData)
{
    // If JavaScript is running, it's not safe to recompile, since we'll end
    // up throwing away code that is live on the stack.
    ASSERT(!globalData->dynamicGlobalObject);
    if (globalData->dynamicGlobalObject)
        return;

    Recompiler recompiler(this);
    globalData->heap.forEachCell(recompiler);
}
Exemplo n.º 2
0
void Debugger::recompileAllJSFunctions(VM* vm)
{
    // If JavaScript is running, it's not safe to recompile, since we'll end
    // up throwing away code that is live on the stack.
    ASSERT(!vm->dynamicGlobalObject);
    if (vm->dynamicGlobalObject)
        return;

    Recompiler recompiler(this);
    vm->heap.objectSpace().forEachLiveCell(recompiler);
}
Exemplo n.º 3
0
void Debugger::recompileAllJSFunctions(VM* vm)
{
    // If JavaScript is running, it's not safe to recompile, since we'll end
    // up throwing away code that is live on the stack.
    if (vm->entryScope) {
        vm->entryScope->setRecompilationNeeded(true);
        return;
    }

    vm->prepareToDiscardCode();

    Recompiler recompiler(this);
    HeapIterationScope iterationScope(vm->heap);
    vm->heap.objectSpace().forEachLiveCell(iterationScope, recompiler);
}
Exemplo n.º 4
0
void Debugger::recompileAllJSFunctions(VM* vm)
{
    // If JavaScript is running, it's not safe to recompile, since we'll end
    // up throwing away code that is live on the stack.
    if (vm->entryScope) {
        auto listener = [] (VM& vm, JSGlobalObject* globalObject) 
        {
            if (Debugger* debugger = globalObject->debugger())
                debugger->recompileAllJSFunctions(&vm);
        };

        vm->entryScope->setEntryScopeDidPopListener(this, listener);
        return;
    }

    vm->prepareToDiscardCode();

    Recompiler recompiler(this);
    HeapIterationScope iterationScope(vm->heap);
    vm->heap.objectSpace().forEachLiveCell(iterationScope, recompiler);
}