Skip to content

Commit c4b288b

Browse files
committed
mike's comments
1 parent 4731d94 commit c4b288b

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

InternalDocs/code_objects.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +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`](code_objects.md) is created, the function
22-
`_PyCode_Quicken()` from [`Python/specialize.c`](../Python/specialize.c) is
23-
called to initialize the caches of all adaptive instructions. This is
24-
required because the on-disk format is a sequence of bytes, and
25-
some of the caches need to be initialized with 16-bit values.
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.
2626

2727
Code objects are nominally immutable.
2828
Some fields (including `co_code_adaptive` and fields for runtime

InternalDocs/interpreter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ assumptions still apply, and de-optimizing back to the generic version if not.
366366
## Families of instructions
367367

368368
A *family* of instructions consists of an adaptive instruction along with the
369-
specialized instruction that it can be replaced by.
369+
specialized instructions that it can be replaced by.
370370
It has the following fundamental properties:
371371

372372
* It corresponds to a single instruction in the code

InternalDocs/jit.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ have changed.
8686
When the full jit is enabled (python was configured with
8787
[`--enable-experimental-jit`](https://docs.python.org/dev/using/configure.html#cmdoption-enable-experimental-jit),
8888
the uop executor's `jit_code` field is populated with a pointer to a compiled
89-
C function that implement the executor logic. This function's signature is
89+
C function that implements the executor logic. This function's signature is
9090
defined by `jit_func` in [`pycore_jit.h`](Include/internal/pycore_jit.h).
9191
When the executor is invoked by `ENTER_EXECUTOR`, instead of jumping to
9292
the uop interpreter at `tier2_dispatch`, the executor runs the function
@@ -101,16 +101,16 @@ of the micro ops, which are completed with runtime information while
101101
the jitted code is constructed for an executor by
102102
[`_PyJIT_Compile`](../Python/jit.c).
103103

104-
The stencils are generated under the build target `regen-jit` by the scripts
105-
in [`/Tools/jit`](/Tools/jit). This script reads
104+
The stencils are generated at build time under the Makefile target `regen-jit`
105+
by the scripts in [`/Tools/jit`](/Tools/jit). This script reads
106106
[`Python/executor_cases.c.h`](../Python/executor_cases.c.h) (which is
107107
generated from [`Python/bytecodes.c`](../Python/bytecodes.c)). For
108108
each opcode, it constructs a `.c` file that contains a function for
109109
implementing this opcode, with some runtime information injected.
110110
This is done by replacing `CASE` by the bytecode definition in the
111111
template file [`Tools/jit/template.c`](../Tools/jit/template.c).
112112

113-
Each of the `.c` file is compiled by LLVM, to produce an object file
113+
Each of the `.c` files is compiled by LLVM, to produce an object file
114114
that contains a function that executes the opcode. These compiled
115115
functions are used to generate the file
116116
[`jit_stencils.h`](../jit_stencils.h), which contains the functions

0 commit comments

Comments
 (0)