Skip to content

Commit efdba4f

Browse files
committed
address code review
1 parent 4b107f5 commit efdba4f

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Python/optimizer.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -800,13 +800,8 @@ _PyJit_translate_single_bytecode_to_trace(
800800
_Py_CODEUNIT *computed_next_instr = computed_next_instr_without_modifiers + (computed_next_instr_without_modifiers->op.code == NOT_TAKEN);
801801
_Py_CODEUNIT *computed_jump_instr = computed_next_instr_without_modifiers + oparg;
802802
assert(next_instr == computed_next_instr || next_instr == computed_jump_instr);
803-
int jump_happened;
804-
if (computed_next_instr == computed_jump_instr) {
805-
jump_happened = target_instr[1].cache & 1;
806-
} else {
807-
jump_happened = computed_jump_instr == next_instr;
808-
}
809-
assert(jump_happened == (target_instr[1].cache & 1));
803+
int jump_happened = target_instr[1].cache & 1;
804+
assert(jump_happened ? (next_instr == computed_jump_instr) : (next_instr == computed_next_instr));
810805
uint32_t uopcode = BRANCH_TO_GUARD[opcode - POP_JUMP_IF_FALSE][jump_happened];
811806
ADD_TO_TRACE(uopcode, 0, 0, INSTR_IP(jump_happened ? computed_next_instr : computed_jump_instr, old_code));
812807
break;

0 commit comments

Comments
 (0)