Skip to content

Commit 676faf8

Browse files
Fix ifdefs
1 parent cedd7af commit 676faf8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Python/ceval_macros.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,21 @@
133133
# define LABEL(name) name:
134134
#endif
135135

136-
#if _Py_TAIL_CALL_INTERP || USE_COMPUTED_GOTOS
136+
#if (_Py_TAIL_CALL_INTERP || USE_COMPUTED_GOTOS) && _Py_TIER2
137137
# define IS_JIT_TRACING() (DISPATCH_TABLE_VAR == TRACING_DISPATCH_TABLE)
138138
// Required to not get stuck in infinite pecialization loops due to specialization failure.
139139
# define IS_JIT_TRACING_MAKING_PROGRESS() (IS_JIT_TRACING() && !tstate->interp->jit_state.do_not_specialize)
140140
# define ENTER_TRACING() \
141141
DISPATCH_TABLE_VAR = TRACING_DISPATCH_TABLE;
142142
# define LEAVE_TRACING() \
143143
DISPATCH_TABLE_VAR = DISPATCH_TABLE;
144+
#else
145+
# define IS_JIT_TRACING() (0)
146+
# define IS_JIT_TRACING_MAKING_PROGRESS() (0)
147+
# define ENTER_TRACING()
148+
# define LEAVE_TRACING()
144149
#endif
145150

146-
147151
/* PRE_DISPATCH_GOTO() does lltrace if enabled. Normally a no-op */
148152
#ifdef Py_DEBUG
149153
#define PRE_DISPATCH_GOTO() if (frame->lltrace >= 5) { \
@@ -324,14 +328,10 @@ GETITEM(PyObject *v, Py_ssize_t i) {
324328
/* This takes a uint16_t instead of a _Py_BackoffCounter,
325329
* because it is used directly on the cache entry in generated code,
326330
* which is always an integral type. */
327-
#if _Py_TIER2
328331
// Force re-specialization when tracing a side exit to get good side exits.
329332
#define ADAPTIVE_COUNTER_TRIGGERS(COUNTER) \
330333
backoff_counter_triggers(forge_backoff_counter((COUNTER))) || IS_JIT_TRACING_MAKING_PROGRESS()
331-
#else
332-
#define ADAPTIVE_COUNTER_TRIGGERS(COUNTER) \
333-
backoff_counter_triggers(forge_backoff_counter((COUNTER)))
334-
#endif
334+
335335
#define ADVANCE_ADAPTIVE_COUNTER(COUNTER) \
336336
do { \
337337
(COUNTER) = advance_backoff_counter((COUNTER)); \

0 commit comments

Comments
 (0)