@@ -367,6 +367,12 @@ Emission of bytecode is handled by the following macros:
367
367
368
368
``ADDOP(struct compiler *, int) ``
369
369
add a specified opcode
370
+ ``ADDOP_NOLINE(struct compiler *, int) ``
371
+ like ``ADDOP `` without a line number; used for artificial opcodes without
372
+ no corresponding token in the source code
373
+ ``ADDOP_IN_SCOPE(struct compiler *, int) ``
374
+ like ``ADDOP ``, but also exits current scope; used for adding return value
375
+ opcodes in lambdas and closures
370
376
``ADDOP_I(struct compiler *, int, Py_ssize_t) ``
371
377
add an opcode that takes an integer argument
372
378
``ADDOP_O(struct compiler *, int, PyObject *, TYPE) ``
@@ -387,10 +393,14 @@ Emission of bytecode is handled by the following macros:
387
393
position of the specified PyObject in the consts table.
388
394
``ADDOP_LOAD_CONST_NEW(struct compiler *, PyObject *) ``
389
395
just like ``ADDOP_LOAD_CONST_NEW ``, but steals a reference to PyObject
390
- ``ADDOP_JABS(struct compiler *, int, basicblock *) ``
391
- create an absolute jump to a basic block
392
- ``ADDOP_JREL(struct compiler *, int, basicblock *) ``
393
- create a relative jump to a basic block
396
+ ``ADDOP_JUMP(struct compiler *, int, basicblock *) ``
397
+ create a jump to a basic block
398
+ ``ADDOP_JUMP_NOLINE(struct compiler *, int, basicblock *) ``
399
+ like ``ADDOP_JUMP `` without a line number; used for artificial jumps
400
+ without no corresponding token in the source code.
401
+ ``ADDOP_JUMP_COMPARE(struct compiler *, cmpop_ty) ``
402
+ depending on the second argument, add an ``ADDOP_I `` with either an
403
+ ``IS_OP ``, ``CONTAINS_OP ``, or ``COMPARE_OP `` opcode.
394
404
395
405
Several helper functions that will emit bytecode and are named
396
406
:samp: `compiler_{ xx } () ` where *xx * is what the function helps with (``list ``,
0 commit comments