Commit 9132d124 authored by Stefan Behnel's avatar Stefan Behnel

some cleanup, fix temp handling in 'if' conditions

parent 5ff4c25a
...@@ -3382,15 +3382,10 @@ class RaiseStatNode(StatNode): ...@@ -3382,15 +3382,10 @@ class RaiseStatNode(StatNode):
else: else:
code.putln( code.putln(
"__Pyx_ReRaise();") "__Pyx_ReRaise();")
if self.exc_type: for obj in (self.exc_type, self.exc_value, self.exc_tb):
self.exc_type.generate_disposal_code(code) if obj:
self.exc_type.free_temps(code) obj.generate_disposal_code(code)
if self.exc_value: obj.free_temps(code)
self.exc_value.generate_disposal_code(code)
self.exc_value.free_temps(code)
if self.exc_tb:
self.exc_tb.generate_disposal_code(code)
self.exc_tb.free_temps(code)
code.putln( code.putln(
code.error_goto(self.pos)) code.error_goto(self.pos))
...@@ -3548,6 +3543,8 @@ class IfClauseNode(Node): ...@@ -3548,6 +3543,8 @@ class IfClauseNode(Node):
code.putln( code.putln(
"if (%s) {" % "if (%s) {" %
self.condition.result()) self.condition.result())
self.condition.generate_disposal_code(code)
self.condition.free_temps(code)
self.body.generate_execution_code(code) self.body.generate_execution_code(code)
#code.putln( #code.putln(
# "goto %s;" % # "goto %s;" %
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment