Skip to content

Commit bd32c31

Browse files
committed
fix typos for compile docs
1 parent 436a6f2 commit bd32c31

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

InternalDocs/compiler.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,19 +359,19 @@ in [Python/compile.c](../Python/compile.c) into a sequence of pseudo instruction
359359
These are similar to bytecode, but in some cases they are more abstract, and are
360360
resolved later into actual bytecode. The construction of this instruction sequence
361361
is handled by several functions that break the task down by various AST node types.
362-
The functions are all named `compiler_visit_{xx}` where *xx* is the name of the node
362+
The functions are all named `codegen_visit_{xx}` where *xx* is the name of the node
363363
type (such as `stmt`, `expr`, etc.). Each function receives a `struct compiler *`
364364
and `{xx}_ty` where *xx* is the AST node type. Typically these functions
365365
consist of a large 'switch' statement, branching based on the kind of
366366
node type passed to it. Simple things are handled inline in the
367367
'switch' statement with more complex transformations farmed out to other
368-
functions named `compiler_{xx}` with *xx* being a descriptive name of what is
368+
functions named `codegen_{xx}` with *xx* being a descriptive name of what is
369369
being handled.
370370

371371
When transforming an arbitrary AST node, use the `VISIT()` macro.
372-
The appropriate `compiler_visit_{xx}` function is called, based on the value
372+
The appropriate `codegen_visit_{xx}` function is called, based on the value
373373
passed in for <node type> (so `VISIT({c}, expr, {node})` calls
374-
`compiler_visit_expr({c}, {node})`). The `VISIT_SEQ()` macro is very similar,
374+
`codegen_visit_expr({c}, {node})`). The `VISIT_SEQ()` macro is very similar,
375375
but is called on AST node sequences (those values that were created as
376376
arguments to a node that used the '*' modifier).
377377

@@ -414,8 +414,8 @@ which is added at the end of a function is not associated with any
414414
line in the source code.
415415

416416
There are several helper functions that will emit pseudo-instructions
417-
and are named `compiler_{xx}()` where *xx* is what the function helps
418-
with (`list`, `boolop`, etc.). A rather useful one is `compiler_nameop()`.
417+
and are named `codegen_{xx}()` where *xx* is what the function helps
418+
with (`list`, `boolop`, etc.). A rather useful one is `codegen_nameop()`.
419419
This function looks up the scope of a variable and, based on the
420420
expression context, emits the proper opcode to load, store, or delete
421421
the variable.

Python/symtable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,7 @@ symtable_enter_type_param_block(struct symtable *st, identifier name,
17081708
return 1;
17091709
}
17101710

1711-
/* VISIT, VISIT_SEQ and VIST_SEQ_TAIL take an ASDL type as their second argument.
1711+
/* VISIT, VISIT_SEQ and VISIT_SEQ_TAIL take an ASDL type as their second argument.
17121712
They use the ASDL name to synthesize the name of the C type and the visit
17131713
function.
17141714

0 commit comments

Comments
 (0)