New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix BlockNode/move literals/constants to code generation #703
Comments
@dagss commented I raised the question on whether char* literal constants are needed at all on the mailing list. The result is "yes". Note that a fix for this issue likely corresponds loosely to a fix of Excerpt:
|
@dagss commented http://trac.cython.org/ticket/99 will probably be fixed as a consequence of this one. |
@dagss commented http://trac.cython.org/ticket/68 has a comment on the same subject: Pyrex has some really good changes gone into it in this area (Greg can be a lot more confident about not breaking things so I suppose he just took it all the way at once); see the commits prior to and leading up to this one: |
@dagss changed priority from |
scoder commented There is a test case for http://trac.cython.org/ticket/99 (-T99) that tests for this. |
scoder changed milestone from |
scoder commented Most of the work went in here: |
scoder commented The constant handling has been moved to codegen time now. The only exception is the builtins cache, which remains inside the scoping infrastructure (for now), as there is no technical need to move it. Two problems remain:
Both of these need fixing as they break previously working code. |
scoder commented The latter is not ticket http://trac.cython.org/ticket/257. |
scoder commented The latter is now ticket http://trac.cython.org/ticket/257. |
scoder changed resolution to
|
In summer 2008, I moved the things that
BlockNode
was made for doing over tocode.funcstate
. However, things are a bit ugly: Constants/literals are recorded inenv
during analysis, then each function environment pipes the literals tocode.funcstate
(possibly making duplicate reports from theenv
), which again makes efforts to merge duplicate entries.This is ugly, and I'm not guaranteeing that it is working 100% either.
One side-effect is that if literals cannot be added in tree transformations, and if you remove literals in transformations then it is still allocated etc.
The best fix is to move registration of literals/constants over to code generation phase (modifying
code.funcstate
along the way). This can be done one literal type at the time, nice and incrementally. When all is done,BlockNode
can be deleted.Migrated from http://trac.cython.org/ticket/144
The text was updated successfully, but these errors were encountered: