-
-
Notifications
You must be signed in to change notification settings - Fork 844
Fix remaining broken links. #1013
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,18 +28,19 @@ Note: sometimes things mysteriously don't work. Before giving up, try ``make cl | |
* :cpy-file:`Grammar/python.gram`: The grammar, with actions that build AST nodes. | ||
After changing it, run ``make regen-pegen`` (or ``build.bat --regen`` on Windows), | ||
to regenerate :cpy-file:`Parser/parser.c`. | ||
(This runs Python's parser generator, ``Tools/peg_generator``). | ||
(This runs Python's parser generator, :cpy-file:`Tools/peg_generator`). | ||
|
||
* :cpy-file:`Grammar/Tokens` is a place for adding new token types. After | ||
changing it, run ``make regen-token`` to regenerate :cpy-file:`Include/token.h`, | ||
:cpy-file:`Parser/token.c`, :cpy-file:`Lib/token.py` and | ||
:cpy-file:`Doc/library/token-list.inc`. If you change both ``python.gram`` | ||
and ``Tokens``, run ``make regen-token`` before ``make regen-pegen``. | ||
changing it, run ``make regen-token`` to regenerate | ||
:cpy-file:`Include/internal/pycore_token.h`, :cpy-file:`Parser/token.c`, | ||
:cpy-file:`Lib/token.py` and :cpy-file:`Doc/library/token-list.inc`. | ||
If you change both ``python.gram`` and ``Tokens``, | ||
run ``make regen-token`` before ``make regen-pegen``. | ||
On Windows, ``build.bat --regen`` will regenerate both at the same time. | ||
|
||
* :cpy-file:`Parser/Python.asdl` may need changes to match the grammar. | ||
Then run ``make regen-ast`` to regenerate :cpy-file:`Include/Python-ast.h` | ||
and :cpy-file:`Python/Python-ast.c`. | ||
Then run ``make regen-ast`` to regenerate | ||
:cpy-file:`Include/internal/pycore_ast.h` and :cpy-file:`Python/Python-ast.c`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
* :cpy-file:`Parser/tokenizer.c` contains the tokenization code. | ||
This is where you would add a new type of comment or string literal, for example. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -490,7 +490,7 @@ Finally, you need to introduce the use of the new bytecode. Altering | |
places to change. You must add the case for a new opcode into the 'switch' | ||
statement in the ``stack_effect()`` function in :cpy-file:`Python/compile.c`. | ||
If the new opcode has a jump target, you will need to update macros and | ||
'switch' statements in :cpy-file:`Python/peephole.c`. If it affects a control | ||
'switch' statements in :cpy-file:`Python/compile.c`. If it affects a control | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The relevant code was apparently moved into |
||
flow or the block stack, you may have to update the ``frame_setlineno()`` | ||
function in :cpy-file:`Objects/frameobject.c`. :cpy-file:`Lib/dis.py` may need | ||
an update if the new opcode interprets its argument in a special way (like | ||
|
@@ -514,7 +514,8 @@ Code Objects | |
============ | ||
|
||
The result of ``PyAST_CompileObject()`` is a ``PyCodeObject`` which is defined in | ||
:cpy-file:`Include/code.h`. And with that you now have executable Python bytecode! | ||
:cpy-file:`Include/cpython/code.h`. And with that you now have executable | ||
Python bytecode! | ||
|
||
The code objects (byte code) are executed in :cpy-file:`Python/ceval.c`. This file | ||
will also need a new case statement for the new opcode in the big switch | ||
|
@@ -579,18 +580,14 @@ Important Files | |
|
||
* :cpy-file:`Python/symtable.c`: Generates a symbol table from AST. | ||
|
||
* :cpy-file:`Python/peephole.c`: Optimizes the bytecode. | ||
|
||
* :cpy-file:`Python/pyarena.c`: Implementation of the arena memory manager. | ||
|
||
* :cpy-file:`Python/wordcode_helpers.h`: Helpers for generating bytecode. | ||
Comment on lines
-582
to
-586
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both got merged into |
||
|
||
* :cpy-file:`Python/opcode_targets.h`: One of the files that must be | ||
modified if :cpy-file:`Lib/opcode.py` is. | ||
|
||
* :cpy-file:`Include/` | ||
* :cpy-file:`Include/code.h`: Header file for :cpy-file:`Objects/codeobject.c`; | ||
contains definition of ``PyCodeObject``. | ||
* :cpy-file:`Include/cpython/code.h`: Header file for | ||
:cpy-file:`Objects/codeobject.c`; contains definition of ``PyCodeObject``. | ||
|
||
* :cpy-file:`Include/opcode.h`: One of the files that must be modified if | ||
:cpy-file:`Lib/opcode.py` is. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include/token.h
was renamed toInclude/internal/pycore_token.h
(the rest is paragraph reflow).