chore(ir): dump formatını sade yap — NAME=... PARAMS=... SLOTS=...
This commit is contained in:
parent
4c67f29362
commit
7b8b2398cd
Binary file not shown.
|
|
@ -23,3 +23,6 @@
|
|||
2 3078 1781799345769137653 CMakeFiles/saqut.dir/src/ir/ir_generator.cpp.o 10a1ed4e1f52e530
|
||||
1 636 1781799663202595202 CMakeFiles/saqut.dir/src/ir/ir_function.cpp.o 10f5e8dfd1461d69
|
||||
636 892 1781799663837592468 saqut f2e198803c4dbffb
|
||||
1 653 1781800137590930314 CMakeFiles/saqut.dir/src/ir/ir_program.cpp.o 9518231d970828da
|
||||
1 658 1781800137589789659 CMakeFiles/saqut.dir/src/ir/ir_function.cpp.o 10f5e8dfd1461d69
|
||||
658 919 1781800138246787400 saqut f2e198803c4dbffb
|
||||
|
|
|
|||
|
|
@ -60,17 +60,18 @@ void IRFunction::dump() const {
|
|||
}
|
||||
header += " [" + std::to_string(slotCount) + " slot]";
|
||||
|
||||
// Üst çizgi
|
||||
std::cout << "+-" << std::string(header.size(), '-') << "-+\n";
|
||||
std::cout << "|" << header << " |\n";
|
||||
std::cout << "+-" << std::string(header.size(), '-') << "-+\n";
|
||||
// Başlık: NAME=fibonacci PARAMS=1 SLOTS=10
|
||||
std::cout << "NAME=" << name
|
||||
<< " PARAMS=" << paramCount
|
||||
<< " SLOTS=" << slotCount
|
||||
<< "\n";
|
||||
|
||||
// Talimatlar
|
||||
for (int i = 0; i < (int)instructions.size(); i++) {
|
||||
const Instruction& ins = instructions[i];
|
||||
|
||||
// Satır numarası
|
||||
std::cout << " " << std::setw(3) << std::right << i << "│ ";
|
||||
std::cout << " " << std::setw(3) << std::right << i << " ";
|
||||
|
||||
// Opcode sütunu (12 karakter genişlik)
|
||||
std::cout << std::left << std::setw(12) << opcodeName(ins.opcode);
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
#include <iostream>
|
||||
|
||||
void IRProgram::dump() const {
|
||||
std::cout << "========== IR DUMP ==========\n\n";
|
||||
std::cout << "IR DUMP\n\n";
|
||||
for (const auto& name : functionOrder) {
|
||||
auto it = functions.find(name);
|
||||
if (it != functions.end()) it->second.dump();
|
||||
}
|
||||
std::cout << "=============================\n";
|
||||
std::cout << "END\n";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue