mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
GH-98522: Add version number to code objects. (GH-98525)
* Add version number to code object for better versioning of functions. * Improves specialization for closures and list comprehensions.
This commit is contained in:
parent
3c5355496b
commit
fb713b2183
10 changed files with 23 additions and 4 deletions
|
@ -3452,6 +3452,7 @@ dummy_func(
|
|||
func->func_defaults = POP();
|
||||
}
|
||||
|
||||
func->func_version = ((PyCodeObject *)codeobj)->co_version;
|
||||
PUSH((PyObject *)func);
|
||||
}
|
||||
|
||||
|
|
1
Python/generated_cases.c.h
generated
1
Python/generated_cases.c.h
generated
|
@ -3693,6 +3693,7 @@
|
|||
func->func_defaults = POP();
|
||||
}
|
||||
|
||||
func->func_version = ((PyCodeObject *)codeobj)->co_version;
|
||||
PUSH((PyObject *)func);
|
||||
DISPATCH();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue