Patch #1638243: the compiler package is now able to correctly compile
a with statement; previously, executing code containing a with statement
compiled by the compiler package crashed the interpreter.
(backport from rev. 53575)
diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py
index 009438d..2af03a8 100644
--- a/Lib/compiler/pycodegen.py
+++ b/Lib/compiler/pycodegen.py
@@ -851,6 +851,8 @@
self.emit('LOAD_CONST', None)
self.nextBlock(final)
self.setups.push((END_FINALLY, final))
+ self._implicitNameOp('LOAD', exitvar)
+ self._implicitNameOp('DELETE', exitvar)
self.emit('WITH_CLEANUP')
self.emit('END_FINALLY')
self.setups.pop()