@@ -609,7 +609,9 @@ def detect_control_flow(self, offset, targets, inst_index):
609609 """
610610
611611 code = self .code
612- op = self .insts [inst_index ].opcode
612+ inst = self .insts [inst_index ]
613+ op = inst .opcode
614+
613615
614616 # Detect parent structure
615617 parent = self .structs [0 ]
@@ -632,7 +634,7 @@ def detect_control_flow(self, offset, targets, inst_index):
632634 # Try to find the jump_back instruction of the loop.
633635 # It could be a return instruction.
634636
635- start += instruction_size ( op , self . opc )
637+ start += inst . inst_size
636638 target = self .get_target (offset )
637639 end = self .restrict_to_parent (target , parent )
638640 self .setup_loops [target ] = offset
@@ -718,8 +720,8 @@ def detect_control_flow(self, offset, targets, inst_index):
718720 'start' : after_jump_offset ,
719721 'end' : end })
720722 elif op in self .pop_jump_tf :
721- start = offset + instruction_size ( op , self . opc )
722- target = self . insts [ inst_index ] .argval
723+ start = offset + inst . inst_size
724+ target = inst .argval
723725 rtarget = self .restrict_to_parent (target , parent )
724726 prev_op = self .prev_op
725727
@@ -757,7 +759,7 @@ def detect_control_flow(self, offset, targets, inst_index):
757759 pre_rtarget = prev_op [rtarget ]
758760
759761 # Is it an "and" inside an "if" or "while" block
760- if op == self .opc .POP_JUMP_IF_FALSE and self . version < 3.6 :
762+ if op == self .opc .POP_JUMP_IF_FALSE :
761763
762764 # Search for another POP_JUMP_IF_FALSE targetting the same op,
763765 # in current statement, starting from current offset, and filter
0 commit comments