mirror of
https://github.com/python/cpython
synced 2024-11-02 09:15:30 +00:00
570a82d46a
Changes to the function version cache: - In addition to the function object, also store the code object, and allow the latter to be retrieved even if the function has been evicted. - Stop assigning new function versions after a critical attribute (e.g. `__code__`) has been modified; the version is permanently reset to zero in this case. - Changes to `__annotations__` are no longer considered critical. (This fixes gh-109998.) Changes to the Tier 2 optimization machinery: - If we cannot map a function version to a function, but it is still mapped to a code object, we continue projecting the trace. The operand of the `_PUSH_FRAME` and `_POP_FRAME` opcodes can be either NULL, a function object, or a code object with the lowest bit set. This allows us to trace through code that calls an ephemeral function, i.e., a function that may not be alive when we are constructing the executor, e.g. a generator expression or certain nested functions. We will lose globals removal inside such functions, but we can still do other peephole operations (and even possibly [call inlining](https://github.com/python/cpython/pull/116290), if we decide to do it), which only need the code object. As before, if we cannot retrieve the code object from the cache, we stop projecting. |
||
---|---|---|
.. | ||
clinic | ||
frozen_modules | ||
_warnings.c | ||
adaptive.md | ||
asdl.c | ||
asm_trampoline.S | ||
assemble.c | ||
ast.c | ||
ast_opt.c | ||
ast_unparse.c | ||
bltinmodule.c | ||
bootstrap_hash.c | ||
brc.c | ||
bytecodes.c | ||
ceval.c | ||
ceval_gil.c | ||
ceval_macros.h | ||
codecs.c | ||
compile.c | ||
condvar.h | ||
context.c | ||
critical_section.c | ||
crossinterp.c | ||
crossinterp_data_lookup.h | ||
crossinterp_exceptions.h | ||
dtoa.c | ||
dup2.c | ||
dynamic_annotations.c | ||
dynload_hpux.c | ||
dynload_shlib.c | ||
dynload_stub.c | ||
dynload_win.c | ||
emscripten_signal.c | ||
emscripten_trampoline.c | ||
errors.c | ||
executor_cases.c.h | ||
fileutils.c | ||
flowgraph.c | ||
formatter_unicode.c | ||
frame.c | ||
frozen.c | ||
frozenmain.c | ||
future.c | ||
gc.c | ||
gc_free_threading.c | ||
gc_gil.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 | ||
initconfig.c | ||
instrumentation.c | ||
intrinsics.c | ||
jit.c | ||
legacy_tracing.c | ||
lock.c | ||
marshal.c | ||
modsupport.c | ||
mysnprintf.c | ||
mystrtoul.c | ||
object_stack.c | ||
opcode_targets.h | ||
optimizer.c | ||
optimizer_analysis.c | ||
optimizer_bytecodes.c | ||
optimizer_cases.c.h | ||
optimizer_symbols.c | ||
parking_lot.c | ||
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 | ||
qsbr.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 | ||
tier2_engine.md | ||
traceback.c | ||
tracemalloc.c | ||
vm-state.md |
Miscellaneous source files for the main Python shared library