mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
GH-122548: Implement branch taken and not taken events for sys.monitoring (GH-122564)
This commit is contained in:
parent
7b811d0562
commit
d2f1d917e8
29 changed files with 998 additions and 583 deletions
|
@ -557,6 +557,12 @@ normalize_jumps_in_block(cfg_builder *g, basicblock *b) {
|
|||
if (backwards_jump == NULL) {
|
||||
return ERROR;
|
||||
}
|
||||
assert(b->b_next->b_iused > 0);
|
||||
assert(b->b_next->b_instr[0].i_opcode == NOT_TAKEN);
|
||||
b->b_next->b_instr[0].i_opcode = NOP;
|
||||
b->b_next->b_instr[0].i_loc = NO_LOCATION;
|
||||
RETURN_IF_ERROR(
|
||||
basicblock_addop(backwards_jump, NOT_TAKEN, 0, last->i_loc));
|
||||
RETURN_IF_ERROR(
|
||||
basicblock_add_jump(backwards_jump, JUMP, target, last->i_loc));
|
||||
last->i_opcode = reversed_opcode;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue