Sturla Molden wrote: > Stefan Behnel skrev: >> in your code and add a tweak to Cython that lets it drop the ref-counting >> in this exact case. >> > I am sure it would be easy, if I knew your code base.
I didn't say it would be easy, just that I think that would be the right place to do it. Ref-counting is done at code generation time, and IIRC, parallel assignments are actually split by the parser, long before type analysis. So we may end up needing a SwapAssignmentNode here, that gets inserted instead of the parallel assignment node after type analysis (i.e. during the optimisations phase). (I know, that's CySpeak to someone who has never seen a parse tree dump - sorry) > (Which btw I am hoping to learn, but with little success so far.) Oh, that's just because most of the non-obvious stuff is shared with Pyrex. <wink> Honestly, did you take this as a starting point? http://wiki.cython.org/DevDocs http://wiki.cython.org/HackerGuide It's not perfect (and certainly far from complete), but it might still give a better start than reading source lines. Personally, I think the best way to get started is to insert a PrintTree() step into the pipeline in Main.py, and just read the tree dump that comes out of a compilation. You might want to stick to a rather short module, though. Stefan _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
