diff options
author | Carl Friedrich Bolz-Tereick <cfbolz@gmx.de> | 2023-03-07 13:46:43 +0100 |
---|---|---|
committer | Carl Friedrich Bolz-Tereick <cfbolz@gmx.de> | 2023-03-07 13:46:43 +0100 |
commit | d147f8517594ae18f69ae2ffe4e01e1bef0717a2 (patch) | |
tree | c17daa8f7ce8cac0351fe2d36365da127fd6540c | |
parent | small improvement, rename have_return to be more clear what it means, and add (diff) | |
download | pypy-d147f8517594ae18f69ae2ffe4e01e1bef0717a2.tar.gz pypy-d147f8517594ae18f69ae2ffe4e01e1bef0717a2.tar.bz2 pypy-d147f8517594ae18f69ae2ffe4e01e1bef0717a2.zip |
remove PythonCodeMaker.instrs
-rw-r--r-- | pypy/interpreter/astcompiler/assemble.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pypy/interpreter/astcompiler/assemble.py b/pypy/interpreter/astcompiler/assemble.py index 21f05b4859..b7c582d145 100644 --- a/pypy/interpreter/astcompiler/assemble.py +++ b/pypy/interpreter/astcompiler/assemble.py @@ -196,7 +196,6 @@ class PythonCodeMaker(ast.ASTVisitor): def use_block(self, block): """Start emitting bytecode into block.""" self.current_block = block - self.instrs = block.instructions def use_next_block(self, block=None): """Set this block as the next_block for the last and use it.""" @@ -213,7 +212,7 @@ class PythonCodeMaker(ast.ASTVisitor): return self.current_block.cant_add_instructions def emit_instr(self, instr): - self.instrs.append(instr) + self.current_block.instructions.append(instr) op = instr.opcode if ( op == ops.RETURN_VALUE or |