Move comment closer to where it applies, plus some formatting consistency

This commit is contained in:
Michael Hansen
2023-08-19 21:24:03 -07:00
parent 916103179c
commit f5c1d4262b

View File

@@ -393,16 +393,16 @@ void bc_disasm(std::ostream& pyc_output, PycRef<PycCode> code, PycModule* mod,
formatted_print(pyc_output, "%d <INVALID>", operand);
}
} else if (opcode == Pyc::LOAD_GLOBAL_A) {
// Special case for Python 3.11+
try {
// Explicitly check for 3.11+
if (mod->verCompare(3, 11) >= 0)
// Special case for Python 3.11+
if (mod->verCompare(3, 11) >= 0) {
if (operand & 1)
formatted_print(pyc_output, "%d: NULL + %s", operand, code->getName(operand >> 1)->value());
else
formatted_print(pyc_output, "%d: %s", operand, code->getName(operand >> 1)->value());
else
} else {
formatted_print(pyc_output, "%d: %s", operand, code->getName(operand)->value());
}
} catch (const std::out_of_range &) {
formatted_print(pyc_output, "%d <INVALID>", operand);
}