bool run() { bool changed = false; for (BlockIndex blockIndex = 0; blockIndex < m_graph.numBlocks(); ++blockIndex) { BasicBlock* block = m_graph.block(blockIndex); if (!block) continue; if (block->cfaFoundConstants) changed |= foldConstants(block); } return changed; }
bool run() { bool changed = false; for (BlockIndex blockIndex = 0; blockIndex < m_graph.m_blocks.size(); ++blockIndex) { BasicBlock* block = m_graph.m_blocks[blockIndex].get(); if (!block) continue; if (!block->cfaDidFinish) changed |= paintUnreachableCode(blockIndex); if (block->cfaFoundConstants) changed |= foldConstants(blockIndex); } return changed; }
bool run() { bool changed = false; for (BlockIndex blockIndex = 0; blockIndex < m_graph.numBlocks(); ++blockIndex) { BasicBlock* block = m_graph.block(blockIndex); if (!block) continue; if (block->cfaFoundConstants) changed |= foldConstants(block); } if (changed && m_graph.m_form == SSA) { // It's now possible that we have Upsilons pointed at JSConstants. Fix that. for (BlockIndex blockIndex = m_graph.numBlocks(); blockIndex--;) { BasicBlock* block = m_graph.block(blockIndex); if (!block) continue; fixUpsilons(block); } } return changed; }