============== idProgram::DisassembleStatement ============== */
| 1685 | ============== |
| 1686 | */ |
| 1687 | void idProgram::DisassembleStatement( idFile *file, int instructionPointer ) const { |
| 1688 | const opcode_t *op; |
| 1689 | const statement_t *statement; |
| 1690 | |
| 1691 | statement = &statements[ instructionPointer ]; |
| 1692 | op = &idCompiler::opcodes[ statement->op ]; |
| 1693 | file->Printf( "%20s(%d):\t%6d: %15s\t", fileList[ statement->file ].c_str(), statement->linenumber, instructionPointer, op->opname ); |
| 1694 | |
| 1695 | if ( statement->a ) { |
| 1696 | file->Printf( "\ta: " ); |
| 1697 | statement->a->PrintInfo( file, instructionPointer ); |
| 1698 | } |
| 1699 | |
| 1700 | if ( statement->b ) { |
| 1701 | file->Printf( "\tb: " ); |
| 1702 | statement->b->PrintInfo( file, instructionPointer ); |
| 1703 | } |
| 1704 | |
| 1705 | if ( statement->c ) { |
| 1706 | file->Printf( "\tc: " ); |
| 1707 | statement->c->PrintInfo( file, instructionPointer ); |
| 1708 | } |
| 1709 | |
| 1710 | file->Printf( "\n" ); |
| 1711 | } |
| 1712 | |
| 1713 | /* |
| 1714 | ============== |