[WIP] bpo-17611: Move unwinding of stack from interpreter to compiler by pitrou · Pull Request #2827 · python/cpython (original) (raw)

It would be quite good to get this change "to the finish line", so to speak. This is an ugly little corner of CPython and cleaning it up is difficult. That's why it has hung around all these years. This patch looks like it does the job, even though it is complicated. It seems to me that 95% of the hard work has been done by Antoine and Mark already.

I have rebased it on the current "master" branch, see nascheme:unwind_stack.

The rebase was not totally painless. I had to re-generate the importlib stuff (not surprising). In ceval, I had to make the following changes:

The unit test test_dist and test_importlib fail for me. It looks like test_dis hasn't been updated to match the latest changes made to the bytecode. Not sure what's wrong with importlib.