From 74b8f7eec71443aa35d9b045273370b957d5f7e3 Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Thu, 30 Nov 2023 12:37:29 -0800 Subject: [PATCH] Move LOAD_SUPER_ATTR cases closer to other name cases --- bytecode.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bytecode.cpp b/bytecode.cpp index f7942fc..85befb1 100644 --- a/bytecode.cpp +++ b/bytecode.cpp @@ -395,6 +395,14 @@ void bc_disasm(std::ostream& pyc_output, PycRef code, PycModule* mod, formatted_print(pyc_output, "%d ", 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 ", 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 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 ", operand); - } - break; case Pyc::BINARY_OP_A: if (static_cast(operand) < binop_strings_len) formatted_print(pyc_output, "%d (%s)", operand, binop_strings[operand]);