Merge branch 'master' of github.com:ncaklovic/pycdc
This commit is contained in:
@@ -1481,8 +1481,7 @@ PycRef<ASTNode> BuildFromCode(PycRef<PycCode> code, PycModule* mod)
|
||||
if (name.type() != ASTNode::NODE_IMPORT) {
|
||||
stack.pop();
|
||||
|
||||
if (mod->verCompare(3, 12) >= 0)
|
||||
{
|
||||
if (mod->verCompare(3, 12) >= 0) {
|
||||
if (operand & 1) {
|
||||
/* Changed in version 3.12:
|
||||
If the low bit of namei is set, then a NULL or self is pushed to the stack
|
||||
|
@@ -390,7 +390,10 @@ void bc_disasm(std::ostream& pyc_output, PycRef<PycCode> code, PycModule* mod,
|
||||
case Pyc::LOAD_METHOD_A:
|
||||
case Pyc::LOAD_FROM_DICT_OR_GLOBALS_A:
|
||||
try {
|
||||
formatted_print(pyc_output, "%d: %s", operand, code->getName(operand)->value());
|
||||
auto arg = operand;
|
||||
if (opcode == Pyc::LOAD_ATTR_A && mod->verCompare(3, 12) >= 0)
|
||||
arg >>= 1;
|
||||
formatted_print(pyc_output, "%d: %s", operand, code->getName(arg)->value());
|
||||
} catch (const std::out_of_range &) {
|
||||
formatted_print(pyc_output, "%d <INVALID>", operand);
|
||||
}
|
||||
|
Reference in New Issue
Block a user