CondExprNode over to new temps
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Sun, 29 Mar 2009 16:00:15 +0000 (18:00 +0200)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Sun, 29 Mar 2009 16:00:15 +0000 (18:00 +0200)
Cython/Compiler/ExprNodes.py

index 077b7a28e4cf28b38cc14b4d0e3e08a4522be4d2..d182db9e74633bf281bd6322f4d8ba805e42ff39 100644 (file)
@@ -4505,7 +4505,7 @@ class BoolBinopNode(NewTempExprNode):
         return (test_result, self.type.is_pyobject)
 
 
-class CondExprNode(ExprNode):
+class CondExprNode(NewTempExprNode):
     #  Short-circuiting conditional expression.
     #
     #  test        ExprNode
@@ -4570,7 +4570,7 @@ class CondExprNode(ExprNode):
         # subexpr allocation strategy than the default, so override evaluation_code.
         
         code.mark_pos(self.pos)
-        #self.allocate_temp_result(code) # uncomment this when we switch to new temps
+        self.allocate_temp_result(code)
         self.test.generate_evaluation_code(code)
         code.putln("if (%s) {" % self.test.result() )
         self.eval_and_get(code, self.true_val)