Exemple #1
0
    void DisassemblerContext::setup_block(const ValuePtr<Block>& block) {
      if (block->dominator())
        setup_term_name(block->dominator());
      
      for (Block::PhiList::const_iterator ii = block->phi_nodes().begin(), ie = block->phi_nodes().end(); ii != ie; ++ii)
        setup_term_definition(*ii);

      for (Block::InstructionList::const_iterator ii = block->instructions().begin(), ie = block->instructions().end(); ii != ie; ++ii)
        setup_term_definition(*ii);
    }
Exemple #2
0
 void DisassemblerContext::print_block(const ValuePtr<Block>& block, const TermDefinitionList& definitions) {
   *m_output << "block " << name(block);
   if (block->dominator())
     *m_output << '(' << name(block->dominator()) << ')';
   *m_output << ":\n";
   for (Block::PhiList::const_iterator ii = block->phi_nodes().begin(), ie = block->phi_nodes().end(); ii != ie; ++ii) {
     *m_output << "  ";
     print_term_definition(*ii);
   }
   print_definitions(definitions, "  ");
 }