Skip to content

Commit 182aea2

Browse files
gh-146018: Disable over-aggressive optimization for _GUARD_CODE_VERSION (GH-145923)
1 parent fd50b41 commit 182aea2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Python/optimizer_bytecodes.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1761,7 +1761,9 @@ dummy_func(void) {
17611761
PyCodeObject *co = get_current_code_object(ctx);
17621762
if (co->co_version == version) {
17631763
_Py_BloomFilter_Add(dependencies, co);
1764-
REPLACE_OP(this_instr, _NOP, 0, 0);
1764+
// TODO gh-144651:
1765+
// If we've previously guarded on this code version in a trace, we
1766+
// can avoid guarding it again.
17651767
}
17661768
else {
17671769
ctx->done = true;

Python/optimizer_cases.c.h

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)