Skip to content

Commit f401e37

Browse files
committed
apply review
1 parent 89191b8 commit f401e37

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crates/stdlib/src/_opcode.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,12 @@ mod _opcode {
207207
}
208208

209209
let effect = match jump {
210+
Some(true) => opcode.stack_effect_jump(oparg),
210211
Some(false) => opcode.stack_effect(oparg),
211-
// jump=True or jump=None: branch-path effect
212-
_ => opcode.stack_effect_jump(oparg),
212+
// jump=None: max of both paths (CPython convention)
213+
None => opcode
214+
.stack_effect(oparg)
215+
.max(opcode.stack_effect_jump(oparg)),
213216
};
214217
Ok(effect)
215218
}

0 commit comments

Comments
 (0)