Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-119786: Add jit.md. Move adaptive.md to a section of interpreter.md.#127175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
iritkatriel merged 13 commits intopython:mainfromiritkatriel:adaptive
Dec 6, 2024
Merged
Changes from1 commit
Commits
Show all changes
13 commits
Select commitHold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
cache layouts
  • Loading branch information
@iritkatriel
iritkatriel committedDec 5, 2024
commit43aa0dfd62f7da5b402f942e483e007fe9cddf6c
12 changes: 7 additions & 5 deletionsInternalDocs/interpreter.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -127,11 +127,13 @@ the same. Cache entries are reserved by the compiler and initialized with zeros
Although they are represented by code units, cache entries do not conform to the
`opcode` / `oparg` format.

If an instruction has an inline cache, the layout of its cache is described by
a `struct` definition in [`pycore_code.h`](../Include/internal/pycore_code.h).
This allows us to access the cache by casting `next_instr` to a pointer to this `struct`.
The size of such a `struct` must be independent of the machine architecture, word size
and alignment requirements. For a 32-bit field, the `struct` should use `_Py_CODEUNIT field[2]`.
If an instruction has an inline cache, the layout of its cache is described in
the instruction's definition in [`Python/bytecodes.c`](../Python/bytecodes.c).
The structs defined in [`pycore_code.h`](../Include/internal/pycore_code.h)
allow us to access the cache by casting `next_instr` to a pointer to the relevant
`struct`. The size of such a `struct` must be independent of the machine
architecture, word size and alignment requirements. For a 32-bit field, the
`struct` should use `_Py_CODEUNIT field[2]`.

The instruction implementation is responsible for advancing `next_instr` past the inline cache.
For example, if an instruction's inline cache is four bytes (that is, two code units) in size,
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp