microsoft/Pyjion

Look into handling potential OOM errors from recursive implementation of BUILD_LIST_UNPACK

brettcannon opened this issue · 2 comments

#141 implemented BUILD_LIST_UNPACK using recursion. While fine, it creates a lot of locals which could trigger a OOM error in crazy edge cases. It wouldn't hurt to avoid that situation if possible.

There should also be a way to avoid storing the temp locally by simply pushing back on to the stack the object being extended and swapping the order of PyJist_ExtendList().

Implemented in #237
Dropped the recursive implementation in favour of a stack iterator