Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 89fa7ec

Browse files
authored
gh-119786: Add jit.md. Move adaptive.md to a section of interpreter.md. (#127175)
1 parent 67b18a1 commit 89fa7ec

File tree

6 files changed

+322
-187
lines changed

6 files changed

+322
-187
lines changed

InternalDocs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ Runtime Objects
3434
Program Execution
3535
---
3636

37-
- [The Interpreter](interpreter.md)
37+
- [The Bytecode Interpreter](interpreter.md)
3838

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

4141
- [Garbage Collector Design](garbage_collector.md)
4242

InternalDocs/adaptive.md

Lines changed: 0 additions & 146 deletions
This file was deleted.

InternalDocs/code_objects.md

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

2227
Code objects are nominally immutable.
2328
Some fields (including `co_code_adaptive` and fields for runtime

InternalDocs/compiler.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -595,16 +595,6 @@ Objects
595595
* [Exception Handling](exception_handling.md): Describes the exception table
596596

597597

598-
Specializing Adaptive Interpreter
599-
=================================
600-
601-
Adding a specializing, adaptive interpreter to CPython will bring significant
602-
performance improvements. These documents provide more information:
603-
604-
* [PEP 659: Specializing Adaptive Interpreter](https://peps.python.org/pep-0659/).
605-
* [Adding or extending a family of adaptive instructions](adaptive.md)
606-
607-
608598
References
609599
==========
610600

0 commit comments

Comments
 (0)