Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
GH-98522: Add version number to code objects, to provide better version numbers for closures and comprehensions.#98525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
@@ -472,6 +472,8 @@ typedef struct _PyShimCodeDef { | |||
extern PyCodeObject * | |||
_Py_MakeShimCode(const _PyShimCodeDef *code); | |||
extern uint32_t _Py_next_func_version; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Is there a reason why this is called func_version and not code_version? I find it a bit confusing (note that in deepfreeze.py we now have_Py_next_func_version = {next_code_version}
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It is primarily used as the version for functions.
https://github.com/python/cpython/blob/main/Python/bytecodes.c#L2976
Caching it in the code object is a further optimization.
netlifybot commentedDec 9, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview forpython-cpython-preview canceled.
|
Address sanitizer test failing itself because its too slow 🤨 |
Uh oh!
There was an error while loading.Please reload this page.
Measured performance impactmight be positive but is too close to noise to be meaningful.