projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
475bc21
)
better error messages during constant folding, forward constants also through type...
author
Stefan Behnel
<scoder@users.berlios.de>
Thu, 18 Dec 2008 08:58:55 +0000
(09:58 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Thu, 18 Dec 2008 08:58:55 +0000
(09:58 +0100)
Cython/Compiler/ExprNodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ExprNodes.py
b/Cython/Compiler/ExprNodes.py
index 00d8f2e979f89bee159429e73d95443a71ad6a4a..d9c4f9b886f90922b360a2960cf63f3091e860b7 100644
(file)
--- a/
Cython/Compiler/ExprNodes.py
+++ b/
Cython/Compiler/ExprNodes.py
@@
-27,7
+27,8
@@
try:
except NameError:
from sets import Set as set
-not_a_constant = object()
+class NotConstant(object): pass # just for the name
+not_a_constant = NotConstant()
constant_value_not_set = object()
class ExprNode(Node):
@@
-4839,6
+4840,9
@@
class CoercionNode(NewTempExprNode):
self.arg = arg
if debug_coercion:
print("%s Coercing %s" % (self, self.arg))
+
+ def calculate_constant_result(self):
+ self.constant_result = self.arg.constant_result
def annotate(self, code):
self.arg.annotate(code)