/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
#if ENABLE(DFG_JIT)
+#include "DFGBlockSetInlines.h"
#include "DFGClobberize.h"
#include "DFGGraph.h"
#include "DFGInsertionSet.h"
{
ASSERT(m_graph.m_form != SSA);
- BitVector blocksThatNeedInvalidationPoints;
+ BlockSet blocksThatNeedInvalidationPoints;
for (BlockIndex blockIndex = m_graph.numBlocks(); blockIndex--;) {
BasicBlock* block = m_graph.block(blockIndex);
// Note: this assumes that control flow occurs at bytecode instruction boundaries.
if (m_originThatHadFire.isSet()) {
for (unsigned i = block->numSuccessors(); i--;)
- blocksThatNeedInvalidationPoints.set(block->successor(i)->index);
+ blocksThatNeedInvalidationPoints.add(block->successor(i));
}
m_insertionSet.execute(block);
}
-
- for (BlockIndex blockIndex = m_graph.numBlocks(); blockIndex--;) {
- if (!blocksThatNeedInvalidationPoints.get(blockIndex))
- continue;
-
- BasicBlock* block = m_graph.block(blockIndex);
+
+ for (BasicBlock* block : blocksThatNeedInvalidationPoints.iterable(m_graph)) {
insertInvalidationCheck(0, block->at(0));
m_insertionSet.execute(block);
}