• Marius Wachtler's avatar
    generator: clean up abandonment generators · 741f69f0
    Marius Wachtler authored
    in order to break cycles we need to traverse all generator owned object at yields.
    The interpreter is fine because it stores all objects inside the vregs so they will already get visited.
    For the llvm jit pass all owned object to the yield call as vararg argument.
    
    We will currently leak (move objects to gc.garbage) when a generator is involved in a cycle because our PyGen_NeedsFinalizing() is much more conservative.
    741f69f0
test_contextlib.py 8.89 KB