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
request compile time value without raising error (allow constant folding) #680
Comments
scoder commented I think the best way to solve this would be to always calculate the values of constant expressions somewhere between the analysis and code generation phase. A dedicated transform would be good for this. It could either replace expressions with their constant result node (e.g. with an |
scoder commented I always forget that |
scoder changed owner from request compile time value without raising error to request compile time value without raising error (allow constant folding) |
scoder commented Initial implementation is here: http://hg.cython.org/cython-devel/rev/8a2e7b51e770 The new The transform does not currently replace nodes by a constant node, this would require:
|
scoder changed milestone from |
Often one wants to try and obtain the compile-time value of an expression, but if it can't be decided then that's just fine. Currently it creates an error.
Migrated from http://trac.cython.org/ticket/119
The text was updated successfully, but these errors were encountered: