Commit 5ff4c25a authored by Stefan Behnel's avatar Stefan Behnel

while loop needs temp disposal, too

parent 1916e25a
...@@ -3644,9 +3644,11 @@ class WhileStatNode(LoopNode, StatNode): ...@@ -3644,9 +3644,11 @@ class WhileStatNode(LoopNode, StatNode):
code.putln( code.putln(
"while (1) {") "while (1) {")
self.condition.generate_evaluation_code(code) self.condition.generate_evaluation_code(code)
self.condition.generate_disposal_code(code)
code.putln( code.putln(
"if (!%s) break;" % "if (!%s) break;" %
self.condition.result()) self.condition.result())
self.condition.free_temps(code)
self.body.generate_execution_code(code) self.body.generate_execution_code(code)
code.put_label(code.continue_label) code.put_label(code.continue_label)
code.putln("}") code.putln("}")
......
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