@@ -490,7 +490,7 @@ Finally, you need to introduce the use of the new bytecode. Altering
490
490
places to change. You must add the case for a new opcode into the 'switch'
491
491
statement in the ``stack_effect() `` function in :cpy-file: `Python/compile.c `.
492
492
If the new opcode has a jump target, you will need to update macros and
493
- 'switch' statements in :cpy-file: `Python/peephole .c `. If it affects a control
493
+ 'switch' statements in :cpy-file: `Python/compile .c `. If it affects a control
494
494
flow or the block stack, you may have to update the ``frame_setlineno() ``
495
495
function in :cpy-file: `Objects/frameobject.c `. :cpy-file: `Lib/dis.py ` may need
496
496
an update if the new opcode interprets its argument in a special way (like
@@ -514,7 +514,8 @@ Code Objects
514
514
============
515
515
516
516
The result of ``PyAST_CompileObject() `` is a ``PyCodeObject `` which is defined in
517
- :cpy-file: `Include/code.h `. And with that you now have executable Python bytecode!
517
+ :cpy-file: `Include/cpython/code.h `. And with that you now have executable
518
+ Python bytecode!
518
519
519
520
The code objects (byte code) are executed in :cpy-file: `Python/ceval.c `. This file
520
521
will also need a new case statement for the new opcode in the big switch
@@ -579,18 +580,14 @@ Important Files
579
580
580
581
* :cpy-file: `Python/symtable.c `: Generates a symbol table from AST.
581
582
582
- * :cpy-file: `Python/peephole.c `: Optimizes the bytecode.
583
-
584
583
* :cpy-file: `Python/pyarena.c `: Implementation of the arena memory manager.
585
584
586
- * :cpy-file: `Python/wordcode_helpers.h `: Helpers for generating bytecode.
587
-
588
585
* :cpy-file: `Python/opcode_targets.h `: One of the files that must be
589
586
modified if :cpy-file: `Lib/opcode.py ` is.
590
587
591
588
* :cpy-file: `Include/ `
592
- * :cpy-file: `Include/code.h `: Header file for :cpy-file: ` Objects/codeobject.c `;
593
- contains definition of ``PyCodeObject ``.
589
+ * :cpy-file: `Include/cpython/ code.h `: Header file for
590
+ :cpy-file: ` Objects/codeobject.c `; contains definition of ``PyCodeObject ``.
594
591
595
592
* :cpy-file: `Include/opcode.h `: One of the files that must be modified if
596
593
:cpy-file: `Lib/opcode.py ` is.
0 commit comments