From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/JavaScriptCore/dfg/DFGDominators.h | 47 +++++++++---------------------- 1 file changed, 14 insertions(+), 33 deletions(-) (limited to 'Source/JavaScriptCore/dfg/DFGDominators.h') diff --git a/Source/JavaScriptCore/dfg/DFGDominators.h b/Source/JavaScriptCore/dfg/DFGDominators.h index c63a84baf..5d266f598 100644 --- a/Source/JavaScriptCore/dfg/DFGDominators.h +++ b/Source/JavaScriptCore/dfg/DFGDominators.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Apple Inc. All rights reserved. + * Copyright (C) 2011, 2014, 2015 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,51 +23,32 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DFGDominators_h -#define DFGDominators_h - -#include +#pragma once #if ENABLE(DFG_JIT) -#include "DFGAnalysis.h" #include "DFGBasicBlock.h" +#include "DFGBlockMap.h" +#include "DFGBlockSet.h" +#include "DFGCFG.h" #include "DFGCommon.h" -#include +#include "DFGGraph.h" +#include +#include +#include namespace JSC { namespace DFG { -class Graph; - -class Dominators : public Analysis { +class Dominators : public WTF::Dominators { + WTF_MAKE_NONCOPYABLE(Dominators); + WTF_MAKE_FAST_ALLOCATED; public: - Dominators(); - ~Dominators(); - - void compute(Graph& graph); - - bool dominates(BlockIndex from, BlockIndex to) const + Dominators(Graph& graph) + : WTF::Dominators(*graph.m_cfg) { - ASSERT(isValid()); - return m_results[to].get(from); } - - bool dominates(BasicBlock* from, BasicBlock* to) const - { - return dominates(from->index, to->index); - } - - void dump(Graph& graph, PrintStream&) const; - -private: - bool pruneDominators(Graph&, BlockIndex); - - Vector m_results; // For each block, the bitvector of blocks that dominate it. - FastBitVector m_scratch; // A temporary bitvector with bit for each block. We recycle this to save new/deletes. }; } } // namespace JSC::DFG #endif // ENABLE(DFG_JIT) - -#endif // DFGDominators_h -- cgit v1.2.1