Skip to content

Commit

Permalink
pythongh-119786: Add jit.md. Move adaptive.md to a section of interpr…
Browse files Browse the repository at this point in the history
…eter.md. (python#127175)
  • Loading branch information
iritkatriel authored and srinivasreddy committed Jan 8, 2025
1 parent d933065 commit f27b290
Show file tree
Hide file tree
Showing 6 changed files with 322 additions and 187 deletions.
4 changes: 2 additions & 2 deletions InternalDocs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ Runtime Objects
Program Execution
---

- [The Interpreter](interpreter.md)
- [The Bytecode Interpreter](interpreter.md)

- [Adaptive Instruction Families](adaptive.md)
- [The JIT](jit.md)

- [Garbage Collector Design](garbage_collector.md)

Expand Down
146 changes: 0 additions & 146 deletions InternalDocs/adaptive.md

This file was deleted.

5 changes: 5 additions & 0 deletions InternalDocs/code_objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ Code objects are typically produced by the bytecode [compiler](compiler.md),
although they are often written to disk by one process and read back in by another.
The disk version of a code object is serialized using the
[marshal](https://docs.python.org/dev/library/marshal.html) protocol.
When a `CodeObject` is created, the function `_PyCode_Quicken()` from
[`Python/specialize.c`](../Python/specialize.c) is called to initialize
the caches of all adaptive instructions. This is required because the
on-disk format is a sequence of bytes, and some of the caches need to be
initialized with 16-bit values.

Code objects are nominally immutable.
Some fields (including `co_code_adaptive` and fields for runtime
Expand Down
10 changes: 0 additions & 10 deletions InternalDocs/compiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -595,16 +595,6 @@ Objects
* [Exception Handling](exception_handling.md): Describes the exception table


Specializing Adaptive Interpreter
=================================

Adding a specializing, adaptive interpreter to CPython will bring significant
performance improvements. These documents provide more information:

* [PEP 659: Specializing Adaptive Interpreter](https://peps.python.org/pep-0659/).
* [Adding or extending a family of adaptive instructions](adaptive.md)


References
==========

Expand Down
Loading

0 comments on commit f27b290

Please sign in to comment.