static void recompileAllJSFunctionsForTypeProfiling(VM& vm, bool shouldEnableTypeProfiling) { vm.prepareToDiscardCode(); bool needsToRecompile = (shouldEnableTypeProfiling ? vm.enableTypeProfiler() : vm.disableTypeProfiler()); if (needsToRecompile) { TypeRecompiler recompiler; HeapIterationScope iterationScope(vm.heap); vm.heap.objectSpace().forEachLiveCell(iterationScope, recompiler); } }
static void recompileAllJSFunctionsForTypeProfiling(VM& vm, bool shouldEnableTypeProfiling) { bool shouldRecompileFromTypeProfiler = (shouldEnableTypeProfiling ? vm.enableTypeProfiler() : vm.disableTypeProfiler()); bool shouldRecompileFromControlFlowProfiler = (shouldEnableTypeProfiling ? vm.enableControlFlowProfiler() : vm.disableControlFlowProfiler()); bool needsToRecompile = shouldRecompileFromTypeProfiler || shouldRecompileFromControlFlowProfiler; if (needsToRecompile) { vm.prepareToDeleteCode(); TypeRecompiler recompiler; HeapIterationScope iterationScope(vm.heap); vm.heap.objectSpace().forEachLiveCell(iterationScope, recompiler); } }
static void recompileAllJSFunctionsForTypeProfiling(VM& vm, bool shouldEnableTypeProfiling) { bool shouldRecompileFromTypeProfiler = (shouldEnableTypeProfiling ? vm.enableTypeProfiler() : vm.disableTypeProfiler()); bool shouldRecompileFromControlFlowProfiler = (shouldEnableTypeProfiling ? vm.enableControlFlowProfiler() : vm.disableControlFlowProfiler()); bool needsToRecompile = shouldRecompileFromTypeProfiler || shouldRecompileFromControlFlowProfiler; if (needsToRecompile) vm.discardAllCode(); }