@@ -359,19 +359,19 @@ in [Python/compile.c](../Python/compile.c) into a sequence of pseudo instruction
359359These are similar to bytecode, but in some cases they are more abstract, and are
360360resolved later into actual bytecode. The construction of this instruction sequence
361361is 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
363363type (such as ` stmt ` , ` expr ` , etc.). Each function receives a ` struct compiler * `
364364and ` {xx}_ty ` where * xx* is the AST node type. Typically these functions
365365consist of a large 'switch' statement, branching based on the kind of
366366node 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
369369being handled.
370370
371371When 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
373373passed 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,
375375but is called on AST node sequences (those values that were created as
376376arguments 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
414414line in the source code.
415415
416416There 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 ()` .
419419This function looks up the scope of a variable and, based on the
420420expression context, emits the proper opcode to load, store, or delete
421421the variable.
0 commit comments