Skip to content
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
relative paths to other InternalDocs
  • Loading branch information
iritkatriel committed Oct 21, 2024
commit 2916a14bc99c7046236c59d34a2e1b524f876358
9 changes: 3 additions & 6 deletions InternalDocs/interpreter.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,14 @@ which are written in
[a DSL](https://github.com/python/cpython/blob/main/Tools/cases_generator/interpreter_definition.md)
developed for this purpose.

Recall that the [Python Compiler](https://github.com/python/cpython/blob/main/InternalDocs/compiler.md)
produces a [`CodeObject`](https://github.com/python/cpython/blob/main/InternalDocs/code_object.md),
Recall that the [Python Compiler](compiler.md) produces a [`CodeObject`](code_object.md),
which contains the bytecode instructions along with static data that is required to execute them,
such as the consts list, variable names,
[exception table](https://github.com/python/cpython/blob/main/InternalDocs/exception_handling.md#format-of-the-exception-table),
and so on.
[exception table](exception_handling.md#format-of-the-exception-table), and so on.

When the interpreter's
[`PyEval_EvalCode()`](https://docs.python.org/3.14/c-api/veryhigh.html#c.PyEval_EvalCode)
function is called to execute a `CodeObject`, it constructs a
[`Frame`](https://github.com/python/cpython/blob/main/InternalDocs/frames.md) and calls
function is called to execute a `CodeObject`, it constructs a [`Frame`](frames.md) and calls
[`_PyEval_EvalFrame()`](https://docs.python.org/3.14/c-api/veryhigh.html#c.PyEval_EvalCode)
to execute the code object in this frame. The frame hold the dynamic state of the
`CodeObject`'s execution, including the instruction pointer, the globals and builtins.
Expand Down