@@ -91,28 +91,8 @@ typedef struct {
9191
9292#define INLINE_CACHE_ENTRIES_FOR_ITER CACHE_ENTRIES(_PyForIterCache)
9393
94- #define QUICKENING_WARMUP_DELAY 8
95-
96- /* We want to compare to zero for efficiency, so we offset values accordingly */
97- #define QUICKENING_INITIAL_WARMUP_VALUE (-QUICKENING_WARMUP_DELAY)
98-
99- void _PyCode_Quicken (PyCodeObject * code );
100-
101- static inline void
102- _PyCode_Warmup (PyCodeObject * code )
103- {
104- if (code -> co_warmup != 0 ) {
105- code -> co_warmup ++ ;
106- if (code -> co_warmup == 0 ) {
107- _PyCode_Quicken (code );
108- }
109- }
110- }
111-
11294extern uint8_t _PyOpcode_Adaptive [256 ];
11395
114- extern Py_ssize_t _Py_QuickenedCount ;
115-
11696// Borrowed references to common callables:
11797struct callable_cache {
11898 PyObject * isinstance ;
@@ -252,10 +232,10 @@ extern void _Py_Specialize_UnpackSequence(PyObject *seq, _Py_CODEUNIT *instr,
252232 int oparg );
253233extern void _Py_Specialize_ForIter (PyObject * iter , _Py_CODEUNIT * instr );
254234
255- /* Deallocator function for static codeobjects used in deepfreeze.py */
256- extern void _PyStaticCode_Dealloc (PyCodeObject * co );
257- /* Function to intern strings of codeobjects */
258- extern int _PyStaticCode_InternStrings (PyCodeObject * co );
235+ /* Finalizer function for static codeobjects used in deepfreeze.py */
236+ extern void _PyStaticCode_Fini (PyCodeObject * co );
237+ /* Function to intern strings of codeobjects and quicken the bytecode */
238+ extern int _PyStaticCode_Init (PyCodeObject * co );
259239
260240#ifdef Py_STATS
261241
@@ -397,8 +377,8 @@ write_location_entry_start(uint8_t *ptr, int code, int length)
397377
398378/* With a 16-bit counter, we have 12 bits for the counter value, and 4 bits for the backoff */
399379#define ADAPTIVE_BACKOFF_BITS 4
400- /* The initial counter value is 31 == 2**ADAPTIVE_BACKOFF_START - 1 */
401- #define ADAPTIVE_BACKOFF_START 5
380+ /* The initial counter value is 1 == 2**ADAPTIVE_BACKOFF_START - 1 */
381+ #define ADAPTIVE_BACKOFF_START 1
402382
403383#define MAX_BACKOFF_VALUE (16 - ADAPTIVE_BACKOFF_BITS)
404384
0 commit comments