| Index: src/hydrogen-bce.h
|
| diff --git a/src/marking-thread.h b/src/hydrogen-bce.h
|
| similarity index 65%
|
| copy from src/marking-thread.h
|
| copy to src/hydrogen-bce.h
|
| index 9efa3af13262165972abf179defac6f83fed4ac9..d91997bda011775d92a66eb9c2c9acbf581d4491 100644
|
| --- a/src/marking-thread.h
|
| +++ b/src/hydrogen-bce.h
|
| @@ -25,47 +25,48 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -#ifndef V8_MARKING_THREAD_H_
|
| -#define V8_MARKING_THREAD_H_
|
| +#ifndef V8_HYDROGEN_BCE_H_
|
| +#define V8_HYDROGEN_BCE_H_
|
|
|
| -#include "atomicops.h"
|
| -#include "flags.h"
|
| -#include "platform.h"
|
| -#include "v8utils.h"
|
| -
|
| -#include "spaces.h"
|
| -
|
| -#include "heap.h"
|
| +#include "hydrogen.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
|
|
| -class MarkingThread : public Thread {
|
| +
|
| +class BoundsCheckBbData;
|
| +class BoundsCheckKey;
|
| +class BoundsCheckTable : private ZoneHashMap {
|
| public:
|
| - explicit MarkingThread(Isolate* isolate);
|
| + explicit BoundsCheckTable(Zone* zone);
|
| +
|
| + INLINE(BoundsCheckBbData** LookupOrInsert(BoundsCheckKey* key, Zone* zone));
|
| + INLINE(void Insert(BoundsCheckKey* key, BoundsCheckBbData* data, Zone* zone));
|
| + INLINE(void Delete(BoundsCheckKey* key));
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(BoundsCheckTable);
|
| +};
|
| +
|
|
|
| - void Run();
|
| - void Stop();
|
| - void StartMarking();
|
| - void WaitForMarkingThread();
|
| +class HBoundsCheckEliminationPhase : public HPhase {
|
| + public:
|
| + explicit HBoundsCheckEliminationPhase(HGraph* graph)
|
| + : HPhase("H_Bounds checks elimination", graph), table_(zone()) { }
|
|
|
| - ~MarkingThread() {
|
| - delete start_marking_semaphore_;
|
| - delete end_marking_semaphore_;
|
| - delete stop_semaphore_;
|
| + void Run() {
|
| + EliminateRedundantBoundsChecks(graph()->entry_block());
|
| }
|
|
|
| private:
|
| - Isolate* isolate_;
|
| - Heap* heap_;
|
| - Semaphore* start_marking_semaphore_;
|
| - Semaphore* end_marking_semaphore_;
|
| - Semaphore* stop_semaphore_;
|
| - volatile AtomicWord stop_thread_;
|
| - int id_;
|
| - static Atomic32 id_counter_;
|
| + void EliminateRedundantBoundsChecks(HBasicBlock* bb);
|
| +
|
| + BoundsCheckTable table_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(HBoundsCheckEliminationPhase);
|
| };
|
|
|
| +
|
| } } // namespace v8::internal
|
|
|
| -#endif // V8_MARKING_THREAD_H_
|
| +#endif // V8_HYDROGEN_BCE_H_
|
|
|