8000 Rename DECREMENT_ADAPTIVE_COUNTER to ADVANCE_... · python/cpython@a80cd0a · GitHub
[go: up one dir, main page]

Skip to content

Commit a80cd0a

Browse files
committed
Rename DECREMENT_ADAPTIVE_COUNTER to ADVANCE_...
1 parent 42c1f26 commit a80cd0a

File tree

3 files changed

+37
-37
lines changed

3 files changed

+37
-37
lines changed

Python/bytecodes.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ dummy_func(
333333
DISPATCH_SAME_OPARG();
334334
}
335335
STAT_INC(TO_BOOL, deferred);
336-
DECREMENT_ADAPTIVE_COUNTER(this_instr[1].cache);
336+
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].cache);
337337
#endif /* ENABLE_SPECIALIZATION */
338338
}
339339

@@ -558,7 +558,7 @@ dummy_func(
558558
DISPATCH_SAME_OPARG();
559559
}
560560
STAT_INC(BINARY_SUBSCR, deferred);
561-
DECREMENT_ADAPTIVE_COUNTER(this_instr[1].cache);
561+
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].cache);
562562
#endif /* ENABLE_SPECIALIZATION */
563563
}
564564

@@ -705,7 +705,7 @@ dummy_func(
705705
DISPATCH_SAME_OPARG();
706706
}
707707
STAT_INC(STORE_SUBSCR, deferred);
708-
DECREMENT_ADAPTIVE_COUNTER(this_instr[1].cache);
708+
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].cache);
709709
#endif /* ENABLE_SPECIALIZATION */
710710
}
711711

@@ -989,7 +989,7 @@ dummy_func(
989989
DISPATCH_SAME_OPARG();
990990
}
991991
STAT_INC(SEND, deferred);
992-
DECREMENT_ADAPTIVE_COUNTER(this_instr[1].cache);
992+
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].cache);
993993
#endif /* ENABLE_SPECIALIZATION */
994994
}
995995

@@ -1218,7 +1218,7 @@ dummy_func(
12181218
DISPATCH_SAME_OPARG();
12191219
}
12201220
STAT_INC(UNPACK_SEQUENCE, deferred);
1221-
DECREMENT_ADAPTIVE_COUNTER(this_instr[1].cache);
1221+
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].cache);
12221222
#endif /* ENABLE_SPECIALIZATION */
12231223
(void)seq;
12241224
(void)counter;
@@ -1288,7 +1288,7 @@ dummy_func(
12881288
DISPATCH_SAME_OPARG();
12891289
}
12901290
STAT_INC(STORE_ATTR, deferred);
1291-
DECREMENT_ADAPTIVE_COUNTER(this_instr[1].cache);
1291+
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].cache);
12921292
#endif /* ENABLE_SPECIALIZATION */
12931293
}
12941294

@@ -1406,7 +1406,7 @@ dummy_func(
14061406
DISPATCH_SAME_OPARG();
14071407
}
14081408
STAT_INC(LOAD_GLOBAL, deferred);
1409-
DECREMENT_ADAPTIVE_COUNTER(this_instr[1].cache);
1409+
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].cache);
14101410
#endif /* ENABLE_SPECIALIZATION */
14111411
}
14121412

@@ -1730,7 +1730,7 @@ dummy_func(
17301730
DISPATCH_SAME_OPARG();
17311731
}
17321732
STAT_INC(LOAD_SUPER_ATTR, deferred);
1733-
DECREMENT_ADAPTIVE_COUNTER(this_instr[1].cache);
1733+
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].cache);
17341734
#endif /* ENABLE_SPECIALIZATION */
17351735
}
17361736

@@ -1844,7 +1844,7 @@ dummy_func(
18441844
DISPATCH_SAME_OPARG();
18451845
}
18461846
STAT_INC(LOAD_ATTR, deferred);
1847-
DECREMENT_ADAPTIVE_COUNTER(this_instr[1].cache);
1847+
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].cache);
18481848
#endif /* ENABLE_SPECIALIZATION */
18491849
}
18501850

@@ -2164,7 +2164,7 @@ dummy_func(
21642164
DISPATCH_SAME_OPARG();
21652165
}
21662166
STAT_INC(COMPARE_OP, deferred);
2167-
DECREMENT_ADAPTIVE_COUNTER(this_instr[1].cache);
2167+
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].cache);
21682168
#endif /* ENABLE_SPECIALIZATION */
21692169
}
21702170

@@ -2261,7 +2261,7 @@ dummy_func(
22612261
DISPATCH_SAME_OPARG();
22622262
}
22632263
STAT_INC(CONTAINS_OP, deferred);
2264-
DECREMENT_ADAPTIVE_COUNTER(this_instr[1].cache);
2264+
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].cache);
22652265
#endif /* ENABLE_SPECIALIZATION */
22662266
}
22672267

@@ -2362,7 +2362,7 @@ dummy_func(
23622362
}
23632363
}
23642364
else {
2365-
DECREMENT_ADAPTIVE_COUNTER(this_instr[1].cache);
2365+
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].cache);
23662366
}
23672367
#endif /* ENABLE_SPECIALIZATION */
23682368
}
@@ -2529,7 +2529,7 @@ dummy_func(
25292529
DISPATCH_SAME_OPARG();
25302530
}
25312531
STAT_INC(FOR_ITER, deferred);
2532-
DECREMENT_ADAPTIVE_COUNTER(this_instr[1].cache);
2532+
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].cache);
25332533
#endif /* ENABLE_SPECIALIZATION */
25342534
}
25352535

@@ -3024,7 +3024,7 @@ dummy_func(
30243024
DISPATCH_SAME_OPARG();
30253025
}
30263026
STAT_INC(CALL, deferred);
3027-
DECREMENT_ADAPTIVE_COUNTER(this_instr[1].cache);
3027+
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].cache);
30283028
#endif /* ENABLE_SPECIALIZATION */
30293029
}
30303030

@@ -3927,7 +3927,7 @@ dummy_func(
39273927
DISPATCH_SAME_OPARG();
39283928
}
39293929
STAT_INC(BINARY_OP, deferred);
3930-
DECREMENT_ADAPTIVE_COUNTER(this_instr[1].cache);
3930+
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].cache);
39313931
#endif /* ENABLE_SPECIALIZATION */
39323932
assert(NB_ADD <= oparg);
39333933
assert(oparg <= NB_INPLACE_XOR);

Python/ceval_macros.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -294,20 +294,20 @@ GETITEM(PyObject *v, Py_ssize_t i) {
294294
backoff_counter_is_zero(forge_backoff_counter((COUNTER)))
295295

296296
#ifdef Py_GIL_DISABLED
297-
#define DECREMENT_ADAPTIVE_COUNTER(COUNTER) \
298-
do { \
299-
/* gh-115999 tracks progress on addressing this. */ \
297+
#define ADVANCE_ADAPTIVE_COUNTER(COUNTER) \
298+
do { \
299+
/* gh-115999 tracks progress on addressing this. */ \
300300
static_assert(0, "The specializing interpreter is not yet thread-safe"); \
301301
} while (0);
302302
#else
303-
#define DECREMENT_ADAPTIVE_COUNTER(COUNTER) \
304-
do { \
303+
#define ADVANCE_ADAPTIVE_COUNTER(COUNTER) \
304+
do { \
305305
(COUNTER) = advance_backoff_counter(forge_backoff_counter((COUNTER))).counter; \
306306
} while (0);
307307
#endif
308308

309-
#define PAUSE_ADAPTIVE_COUNTER(COUNTER) \
310-
do { \
309+
#define PAUSE_ADAPTIVE_COUNTER(COUNTER) \
310+
do { \
311311
(COUNTER) = pause_backoff_counter(forge_backoff_counter((COUNTER))).counter; \
312312
} while (0);
313313

Python/generated_cases.c.h

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0