Skip to content

Commit 7a0aced

Browse files
committed
gh-148510: restore func_version check in _LOAD_ATTR_PROPERTY_FRAME
1 parent 6a430c8 commit 7a0aced

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

Lib/test/test_capi/test_opt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4918,6 +4918,7 @@ def testfunc(*args):
49184918
uops = get_opnames(ex)
49194919
self.assertIn("_LOAD_ATTR_PROPERTY_FRAME", uops)
49204920
# Check the optimizer traced through the property call.
4921+
self.assertNotIn("_LOAD_GLOBAL_BUILTINS", uops)
49214922
self.assertIn("_CALL_BUILTIN_CLASS", uops)
49224923

49234924
fget.__code__ = (lambda self: 2).__code__

Python/optimizer_bytecodes.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,7 @@ dummy_func(void) {
10121012
break;
10131013
}
10141014
f->locals[0] = owner;
1015+
f->func = func;
10151016
new_frame = PyJitRef_WrapInvalid(f);
10161017
}
10171018

Python/optimizer_cases.c.h

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

0 commit comments

Comments
 (0)