mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-124285: Fix bug where bool() is called multiple times for the same part of a boolean expression (#124394)
This commit is contained in:
parent
c58c572a65
commit
78aeb38f7d
14 changed files with 234 additions and 47 deletions
|
@ -2570,6 +2570,14 @@ dummy_func(
|
|||
JUMP_BACKWARD_NO_INTERRUPT,
|
||||
};
|
||||
|
||||
pseudo(JUMP_IF_FALSE, (cond -- cond)) = [
|
||||
COPY, TO_BOOL, POP_JUMP_IF_FALSE,
|
||||
];
|
||||
|
||||
pseudo(JUMP_IF_TRUE, (cond -- cond)) = [
|
||||
COPY, TO_BOOL, POP_JUMP_IF_TRUE,
|
||||
];
|
||||
|
||||
tier1 inst(ENTER_EXECUTOR, (--)) {
|
||||
#ifdef _Py_TIER2
|
||||
PyCodeObject *code = _PyFrame_GetCode(frame);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue