Skip to content

Commit ae5e64e

Browse files
authored
Merge branch 'main' into python#129912
2 parents 678cb68 + 1b27f36 commit ae5e64e

8 files changed

+6
-30
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Allow building the JIT with the tailcall interpreter.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Improve the experimental JIT's handling of returns to unknown callers.

Python/ceval_macros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ do { \
397397
stack_pointer = _PyFrame_GetStackPointer(frame); \
398398
if (next_instr == NULL) { \
399399
next_instr = frame->instr_ptr; \
400-
goto error; \
400+
JUMP_TO_LABEL(error); \
401401
} \
402402
DISPATCH(); \
403403
} while (0)

Python/instrumentation.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ is_instrumented(int opcode)
185185
{
186186
assert(opcode != 0);
187187
assert(opcode != RESERVED);
188-
assert(opcode != ENTER_EXECUTOR);
189-
return opcode >= MIN_INSTRUMENTED_OPCODE;
188+
return opcode != ENTER_EXECUTOR && opcode >= MIN_INSTRUMENTED_OPCODE;
190189
}
191190

192191
#ifndef NDEBUG

Python/optimizer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ translate_bytecode_to_trace(
671671
if (trace_stack_depth == 0) {
672672
DPRINTF(2, "Trace stack underflow\n");
673673
OPT_STAT_INC(trace_stack_underflow);
674-
goto done;
674+
return 0;
675675
}
676676
}
677677
uint32_t orig_oparg = oparg; // For OPARG_TOP/BOTTOM

configure

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

configure.ac

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7033,19 +7033,6 @@ fi
70337033
],
70347034
[AC_MSG_RESULT([no value specified])])
70357035

7036-
# Do not enable tail-calling interpreter if tier 2 is enabled.
7037-
AS_VAR_IF(
7038-
[tier2_flags],
7039-
[],
7040-
[
7041-
case "$ac_cv_tail_call" in yes*)
7042-
AC_DEFINE([Py_TAIL_CALL_INTERP], [1],
7043-
[Define if the C compiler supports efficient proper tail calls.])
7044-
esac
7045-
],
7046-
[]
7047-
)
7048-
70497036

70507037
case $ac_sys_system in
70517038
AIX*)

pyconfig.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1718,7 +1718,7 @@
17181718
/* The version of SunOS/Solaris as reported by `uname -r' without the dot. */
17191719
#undef Py_SUNOS_VERSION
17201720

1721-
/* Define if the C compiler supports efficient proper tail calls. */
1721+
/* Define if you want to use tail-calling interpreters in CPython. */
17221722
#undef Py_TAIL_CALL_INTERP
17231723

17241724
/* Define if you want to enable tracing references for debugging purpose */

0 commit comments

Comments
 (0)