Skip to content

Commit 7fd861c

Browse files
committed
Add #ifdefs for debug-jit as well
1 parent 259218a commit 7fd861c

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

Python/bytecodes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5349,9 +5349,9 @@ dummy_func(
53495349
tier2 op(_START_EXECUTOR, (executor/4 --)) {
53505350
#ifndef _Py_JIT
53515351
current_executor = (_PyExecutorObject*)executor;
5352-
#endif
53535352
#ifdef Py_DEBUG
53545353
assert(STACK_LEVEL() + current_cached_values == oparg);
5354+
#endif
53555355
#endif
53565356
assert(tstate->jit_exit == NULL || tstate->jit_exit->executor == current_executor);
53575357
tstate->current_executor = (PyObject *)executor;

Python/ceval.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ dump_stack(_PyInterpreterFrame *frame, _PyStackRef *stack_pointer)
215215
_PyFrame_GetStackPointer(frame);
216216
}
217217

218+
#ifndef _Py_JIT
218219
static void
219220
dump_cache_item(_PyStackRef cache, int position, int depth)
220221
{
@@ -225,6 +226,7 @@ dump_cache_item(_PyStackRef cache, int position, int depth)
225226
printf("---");
226227
}
227228
}
229+
#endif
228230

229231
static void
230232
lltrace_instruction(_PyInterpreterFrame *frame,

Python/ceval_macros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ GETITEM(PyObject *v, Py_ssize_t i) {
212212
#define WITHIN_STACK_BOUNDS() \
213213
(frame->owner == FRAME_OWNED_BY_INTERPRETER || (STACK_LEVEL() >= 0 && STACK_LEVEL() <= STACK_SIZE()))
214214

215-
#ifdef Py_DEBUG
215+
#if defined(Py_DEBUG) && !defined(_Py_JIT)
216216
#define WITHIN_STACK_BOUNDS_WITH_CACHE() \
217217
(frame->owner == FRAME_OWNED_BY_INTERPRETER || (STACK_LEVEL() >= 0 && (STACK_LEVEL() + current_cached_values) <= STACK_SIZE()))
218218
#else

Python/executor_cases.c.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)