From 58fa42e35f386acf7a7acc6ace1807bb75e5171d Mon Sep 17 00:00:00 2001 From: Irit Katriel Date: Wed, 5 Jun 2024 23:45:41 +0100 Subject: [PATCH 1/3] gh-119786: move adaptive interpreter doc from Python to InternalsDoc --- {Python => InternalDocs}/adaptive.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {Python => InternalDocs}/adaptive.md (100%) diff --git a/Python/adaptive.md b/InternalDocs/adaptive.md similarity index 100% rename from Python/adaptive.md rename to InternalDocs/adaptive.md From c8f00f8730fe85ad4e51285327296eca0c7cd73d Mon Sep 17 00:00:00 2001 From: Irit Katriel Date: Wed, 5 Jun 2024 23:56:03 +0100 Subject: [PATCH 2/3] add index entry and links to src code --- InternalDocs/README.md | 1 + InternalDocs/adaptive.md | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/InternalDocs/README.md b/InternalDocs/README.md index e69e27d1542990..a2502fbf198735 100644 --- a/InternalDocs/README.md +++ b/InternalDocs/README.md @@ -14,3 +14,4 @@ it is not, please report that through the [Exception Handling](exception_handling.md) +[Adaptive Instruction Families](adaptive.md) diff --git a/InternalDocs/adaptive.md b/InternalDocs/adaptive.md index d978c089b237e0..3afab78ecc3fe0 100644 --- a/InternalDocs/adaptive.md +++ b/InternalDocs/adaptive.md @@ -2,8 +2,9 @@ ## Families of instructions -The core part of PEP 659 (specializing adaptive interpreter) is the families -of instructions that perform the adaptive specialization. +The core part of [PEP 659](https://peps.python.org/pep-0659/) +(specializing adaptive interpreter) is the families of +instructions that perform the adaptive specialization. A family of instructions has the following fundamental properties: @@ -30,8 +31,9 @@ although these are not fundamental and may change: ## Example family -The `LOAD_GLOBAL` instruction (in Python/bytecodes.c) already has an adaptive -family that serves as a relatively simple example. +The `LOAD_GLOBAL` instruction (in +[Python/bytecodes.c](https://github.com/python/cpython/blob/main/Python/bytecodes.c) +already has an adaptive family that serves as a relatively simple example. The `LOAD_GLOBAL` instruction performs adaptive specialization, calling `_Py_Specialize_LoadGlobal()` when the counter reaches zero. From a5f4b44ca81de098cd76a6dbfebcb920f64d0fdb Mon Sep 17 00:00:00 2001 From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:34:51 +0100 Subject: [PATCH 3/3] Update InternalDocs/adaptive.md Co-authored-by: Alex Waygood --- InternalDocs/adaptive.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InternalDocs/adaptive.md b/InternalDocs/adaptive.md index 3afab78ecc3fe0..09245730b271fa 100644 --- a/InternalDocs/adaptive.md +++ b/InternalDocs/adaptive.md @@ -32,7 +32,7 @@ although these are not fundamental and may change: ## Example family The `LOAD_GLOBAL` instruction (in -[Python/bytecodes.c](https://github.com/python/cpython/blob/main/Python/bytecodes.c) +[Python/bytecodes.c](https://github.com/python/cpython/blob/main/Python/bytecodes.c)) already has an adaptive family that serves as a relatively simple example. The `LOAD_GLOBAL` instruction performs adaptive specialization,