Move LOAD_SUPER_ATTR cases closer to other name cases

This commit is contained in:
Michael Hansen
2023-11-30 12:37:29 -08:00
parent b424ae8fd7
commit 74b8f7eec7

View File

@@ -395,6 +395,14 @@ void bc_disasm(std::ostream& pyc_output, PycRef<PycCode> code, PycModule* mod,
formatted_print(pyc_output, "%d <INVALID>", operand);
}
break;
case Pyc::LOAD_SUPER_ATTR_A:
case Pyc::INSTRUMENTED_LOAD_SUPER_ATTR_A:
try {
formatted_print(pyc_output, "%d: %s", operand, code->getName(operand >> 2)->value());
} catch (const std::out_of_range &) {
formatted_print(pyc_output, "%d <INVALID>", operand);
}
break;
case Pyc::DELETE_FAST_A:
case Pyc::LOAD_FAST_A:
case Pyc::STORE_FAST_A:
@@ -486,14 +494,6 @@ void bc_disasm(std::ostream& pyc_output, PycRef<PycCode> code, PycModule* mod,
else
formatted_print(pyc_output, "%d (UNKNOWN)", operand);
break;
case Pyc::LOAD_SUPER_ATTR_A:
case Pyc::INSTRUMENTED_LOAD_SUPER_ATTR_A:
try {
formatted_print(pyc_output, "%d: %s", operand, code->getName(operand >> 2)->value());
} catch (const std::out_of_range &) {
formatted_print(pyc_output, "%d <INVALID>", operand);
}
break;
case Pyc::BINARY_OP_A:
if (static_cast<size_t>(operand) < binop_strings_len)
formatted_print(pyc_output, "%d (%s)", operand, binop_strings[operand]);