mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
![]() The switch cases (really TARGET(opcode) macros) have been moved from ceval.c to generated_cases.c.h. That file is generated from instruction definitions in bytecodes.c (which impersonates a C file so the C code it contains can be edited without custom support in e.g. VS Code). The code generator lives in Tools/cases_generator (it has a README.md explaining how it works). The DSL used to describe the instructions is a work in progress, described in https://github.com/faster-cpython/ideas/blob/main/3.12/interpreter_definition.md. This is surely a work-in-progress. An easy next step could be auto-generating super-instructions. **IMPORTANT: Merge Conflicts** If you get a merge conflict for instruction implementations in ceval.c, your best bet is to port your changes to bytecodes.c. That file looks almost the same as the original cases, except instead of `TARGET(NAME)` it uses `inst(NAME)`, and the trailing `DISPATCH()` call is omitted (the code generator adds it automatically). |
||
---|---|---|
.. | ||
clinic | ||
deepfreeze | ||
frozen_modules | ||
_warnings.c | ||
adaptive.md | ||
asdl.c | ||
asm_trampoline.S | ||
ast.c | ||
ast_opt.c | ||
ast_unparse.c | ||
bltinmodule.c | ||
bootstrap_hash.c | ||
bytecodes.c | ||
ceval.c | ||
ceval_gil.c | ||
codecs.c | ||
compile.c | ||
condvar.h | ||
context.c | ||
dtoa.c | ||
dup2.c | ||
dynamic_annotations.c | ||
dynload_hpux.c | ||
dynload_shlib.c | ||
dynload_stub.c | ||
dynload_win.c | ||
emscripten_signal.c | ||
errors.c | ||
fileutils.c | ||
formatter_unicode.c | ||
frame.c | ||
frozen.c | ||
frozenmain.c | ||
future.c | ||
generated_cases.c.h | ||
getargs.c | ||
getcompiler.c | ||
getcopyright.c | ||
getopt.c | ||
getplatform.c | ||
getversion.c | ||
hamt.c | ||
hashtable.c | ||
import.c | ||
importdl.c | ||
importdl.h | ||
importlib.h | ||
initconfig.c | ||
makeopcodetargets.py | ||
marshal.c | ||
modsupport.c | ||
mysnprintf.c | ||
mystrtoul.c | ||
opcode_targets.h | ||
pathconfig.c | ||
perf_trampoline.c | ||
preconfig.c | ||
pyarena.c | ||
pyctype.c | ||
pyfpe.c | ||
pyhash.c | ||
pylifecycle.c | ||
pymath.c | ||
pystate.c | ||
pystrcmp.c | ||
pystrhex.c | ||
pystrtod.c | ||
Python-ast.c | ||
Python-tokenize.c | ||
pythonrun.c | ||
pytime.c | ||
README | ||
specialize.c | ||
stdlib_module_names.h | ||
structmember.c | ||
suggestions.c | ||
symtable.c | ||
sysmodule.c | ||
thread.c | ||
thread_nt.h | ||
thread_pthread.h | ||
thread_pthread_stubs.h | ||
traceback.c |
Miscellaneous source files for the main Python shared library