mirror of
https://github.com/python/cpython.git
synced 2026-01-01 21:14:02 +00:00
bpo-44338: Port LOAD_GLOBAL to PEP 659 adaptive interpreter (GH-26638)
* Add specializations of LOAD_GLOBAL. * Add more stats. * Remove old opcache; it is no longer used. * Add NEWS
This commit is contained in:
parent
fafcfff926
commit
eecbc7c390
9 changed files with 209 additions and 337 deletions
|
|
@ -106,20 +106,6 @@ struct PyCodeObject {
|
|||
interpreter. */
|
||||
union _cache_or_instruction *co_quickened;
|
||||
|
||||
/* Per opcodes just-in-time cache
|
||||
*
|
||||
* To reduce cache size, we use indirect mapping from opcode index to
|
||||
* cache object:
|
||||
* cache = co_opcache[co_opcache_map[next_instr - first_instr] - 1]
|
||||
*/
|
||||
|
||||
// co_opcache_map is indexed by (next_instr - first_instr).
|
||||
// * 0 means there is no cache for this opcode.
|
||||
// * n > 0 means there is cache in co_opcache[n-1].
|
||||
unsigned char *co_opcache_map;
|
||||
_PyOpcache *co_opcache;
|
||||
int co_opcache_flag; // used to determine when create a cache.
|
||||
unsigned char co_opcache_size; // length of co_opcache.
|
||||
};
|
||||
|
||||
/* Masks for co_flags above */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue