File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,13 +58,21 @@ static uint16_t value_and_backoff_next[] = {
5858static inline _Py_BackoffCounter
5959make_backoff_counter (uint16_t value , uint16_t backoff )
6060{
61- // assert(backoff <= UNREACHABLE_BACKOFF);
61+ assert (backoff <= UNREACHABLE_BACKOFF );
6262 assert (value <= MAX_VALUE );
6363 return ((_Py_BackoffCounter ){
6464 .value_and_backoff = MAKE_VALUE_AND_BACKOFF (value , backoff )
6565 });
6666}
6767
68+ static inline _Py_BackoffCounter
69+ forge_backoff_counter (uint16_t counter )
70+ {
71+ _Py_BackoffCounter result ;
72+ result .value_and_backoff = counter ;
73+ return result ;
74+ }
75+
6876static inline _Py_BackoffCounter
6977restart_backoff_counter (_Py_BackoffCounter counter )
7078{
Original file line number Diff line number Diff line change @@ -315,7 +315,7 @@ GETITEM(PyObject *v, Py_ssize_t i) {
315315 * which is always an integral type. */
316316// Force re-specialization when tracing a side exit to get good side exits.
317317#define ADAPTIVE_COUNTER_TRIGGERS (COUNTER ) \
318- backoff_counter_triggers(make_backoff_counter(0, (COUNTER)))
318+ backoff_counter_triggers(forge_backoff_counter( (COUNTER)))
319319
320320#define ADVANCE_ADAPTIVE_COUNTER (COUNTER ) \
321321 do { \
You can’t perform that action at this time.
0 commit comments