Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Fidget-Spinner committed Jan 9, 2025
1 parent 6132746 commit 16db128
Show file tree
Hide file tree
Showing 9 changed files with 473 additions and 263 deletions.
8 changes: 7 additions & 1 deletion Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -1985,7 +1985,7 @@ Objects/mimalloc/page.o: $(srcdir)/Objects/mimalloc/page-queue.c
.PHONY: regen-cases
regen-cases: \
regen-opcode-ids regen-opcode-targets regen-uop-ids regen-opcode-metadata-py \
regen-generated-cases regen-executor-cases regen-optimizer-cases \
regen-generated-cases regen-generated-tail-call-handlers regen-executor-cases regen-optimizer-cases \
regen-opcode-metadata regen-uop-metadata

.PHONY: regen-opcode-ids
Expand Down Expand Up @@ -2018,6 +2018,12 @@ regen-generated-cases:
-o $(srcdir)/Python/generated_cases.c.h.new $(srcdir)/Python/bytecodes.c
$(UPDATE_FILE) $(srcdir)/Python/generated_cases.c.h $(srcdir)/Python/generated_cases.c.h.new

.PHONY: regen-generated-tail-call-handlers
regen-generated-tail-call-handlers:
$(PYTHON_FOR_REGEN) $(srcdir)/Tools/cases_generator/tier1_tail_call_generator.py \
-o $(srcdir)/Python/generated_tail_call_handlers.c.h.new $(srcdir)/Python/bytecodes.c
$(UPDATE_FILE) $(srcdir)/Python/generated_tail_call_handlers.c.h $(srcdir)/Python/generated_tail_call_handlers.c.h.new

.PHONY: regen-executor-cases
regen-executor-cases:
$(PYTHON_FOR_REGEN) $(srcdir)/Tools/cases_generator/tier2_generator.py \
Expand Down
32 changes: 16 additions & 16 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -782,24 +782,24 @@ _PyObjectArray_Free(PyObject **array, PyObject **scratch)
#endif

#ifdef Py_TAIL_CALL_INTERP
#include "generated_cases_tail_call.c.h"
#include "generated_tail_call_handlers.c.h"
# ifdef LLTRACE
static inline PyObject *
_TAIL_CALL_shim(_PyInterpreterFrame *frame, _PyStackRef *stack_pointer,
PyThreadState *tstate, _Py_CODEUNIT *next_instr, int oparg, _PyInterpreterFrame* entry_frame, int lltrace)
{
return (INSTRUCTION_TABLE[next_instr->op.code])(frame, stack_pointer, tstate, next_instr, next_instr->op.arg, entry_frame, lltrace);
}
# else
static inline PyObject *
_TAIL_CALL_shim(_PyInterpreterFrame *frame, _PyStackRef *stack_pointer,
PyThreadState *tstate, _Py_CODEUNIT *next_instr, int oparg, _PyInterpreterFrame* entry_frame)
{
return (INSTRUCTION_TABLE[next_instr->op.code])(frame, stack_pointer, tstate, next_instr, next_instr->op.arg, entry_frame);
}
# endif
#endif

#ifdef LLTRACE
static inline PyObject *
_TAIL_CALL_shim(_PyInterpreterFrame *frame, _PyStackRef *stack_pointer,
PyThreadState *tstate, _Py_CODEUNIT *next_instr, int oparg, _PyInterpreterFrame* entry_frame, int lltrace)
{
return (INSTRUCTION_TABLE[next_instr->op.code])(frame, stack_pointer, tstate, next_instr, next_instr->op.arg, entry_frame, lltrace);
}
#else
static inline PyObject *
_TAIL_CALL_shim(_PyInterpreterFrame *frame, _PyStackRef *stack_pointer,
PyThreadState *tstate, _Py_CODEUNIT *next_instr, int oparg, _PyInterpreterFrame* entry_frame)
{
return (INSTRUCTION_TABLE[next_instr->op.code])(frame, stack_pointer, tstate, next_instr, next_instr->op.arg, entry_frame);
}
#endif

PyObject* _Py_HOT_FUNCTION
_PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag)
Expand Down
6 changes: 3 additions & 3 deletions Python/executor_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 16db128

Please sign in to comment.