-
- Downloads
Validate and fix temp releasing (GH-3708) (GH-3717)
* Validate and fix temp releasing (GH-3708) Backports 92147baf11071352ffbfa475d0d21e091753e628. * Fix a temp leak in the type init code. * Fix temp leaks in fused types initialisation code. * Correctly release the buffer index temps allocated for index calculations. * Make tests fails hard if a temp variable is not released at the end of a generated function. * Fix temp leak in switch statement code. * Make end-to-end tests fail on refnanny output. * Fix result temp leak in PyTypeTestNode. * Fix result temp leak in external type/function import code and enable the refnanny check for them. * Fix temp leak when try-return-finally is used in generators. * Make it explicit when an allocated temp is not meant to be reused. * Fix temp leak when assigning to the real/imag attributes of complex numbers. * Fix temp leak when assigning to a memoryview slice. * Clean up "num_threads" result temp in parallel section, not only in prange loop. * Fix temp leak in Pythran buffer setitem code. * Simplify NumPyMethodCallNode since it does not need the Python function anymore. Previously, it generated code that needlessly looked up the Python function without actually using it. * Fix temp leak when deleting C++ objects. * Add a test that actually reusing temps when deleting C++ objects works correctly.
Showing
- Cython/Compiler/Code.py 29 additions, 8 deletionsCython/Compiler/Code.py
- Cython/Compiler/ExprNodes.py 32 additions, 22 deletionsCython/Compiler/ExprNodes.py
- Cython/Compiler/FusedNode.py 6 additions, 0 deletionsCython/Compiler/FusedNode.py
- Cython/Compiler/ModuleNode.py 6 additions, 2 deletionsCython/Compiler/ModuleNode.py
- Cython/Compiler/Nodes.py 11 additions, 2 deletionsCython/Compiler/Nodes.py
- tests/run/cpp_classes.pyx 13 additions, 0 deletionstests/run/cpp_classes.pyx
Loading
Please register or sign in to comment