[Cython] Asking for review: More result_code refactor etc.
Dag Sverre Seljebotn
dagss at student.matnat.uio.no
Mon Sep 29 20:23:47 CEST 2008
Buffer access towards complex types (treating them as a struct of two
floats) are now up in -dagss.
In order to get there I had to do a couple of dangerous things regarding
result_code though. These patches are really small but someone with more
knowledge may have more or less confidence in them than I:
http://hg.cython.org/cython-dagss/rev/b2bcc32021fd
http://hg.cython.org/cython-dagss/rev/a8a9e4c7d5bd
Note that this should fix the CloneNode issue I talked about. (And all
tests pass btw; yet this is the kind of thing that would cause
horrendous failures in obscure cases which are likely not tested for...)
Also in -dagss I've introduces NewTempExprNode, which is a transitionary
class where the temp allocation is moved to code generation. Ideally all
ExprNodes should descend from this one instead (and then it should be
folded back into ExprNode to complete the migration).
Some classes fail hard when they are changed to the new scheme. It works
for BinOpNode which now uses it. This should allow partial migration.
(One must make sure a class can work with the new temp allocation scheme
before constructing them in a transform after analysis).
--
Dag Sverre
More information about the Cython-dev
mailing list