Skip to content

Commit cf4c042

Browse files
committed
merge adaptive.md into interpreter.md
1 parent 81e374e commit cf4c042

File tree

6 files changed

+180
-202
lines changed

6 files changed

+180
-202
lines changed

Diff for: InternalDocs/README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ Runtime Objects
3333
Program Execution
3434
---
3535

36-
- [The Basic Interpreter](interpreter.md)
37-
38-
- [The Specializing Interpreter](adaptive.md)
36+
- [The Bytecode Interpreter](interpreter.md)
3937

4038
- [The Tier 2 Interpreter and JIT](tier2.md)
4139

Diff for: InternalDocs/adaptive.md

-161
This file was deleted.

Diff for: InternalDocs/code_objects.md

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

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

Diff for: InternalDocs/compiler.md

-10
Original file line numberDiff line numberDiff line change
@@ -597,16 +597,6 @@ Objects
597597
* [Exception Handling](exception_handling.md): Describes the exception table
598598

599599

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

0 commit comments

Comments
 (0)