Commit 94fc1166 authored by Sebastian Biewer's avatar Sebastian Biewer

Fixes Redmine bug 242 and fixes #1

parent dd996e78
......@@ -501,6 +501,7 @@ PC.WhileStmt::compile = (compiler) ->
b = compiler.compile(@children[0])
control = compiler.emitChoice()
compiler.emitCondition(b)
compiler.emitSimplePrefix(CCS.internalChannelName)
breaks = compiler.compile(@children[1], entry)
entry.emitCallProcessFromFrame(compiler, compiler.getProcessFrame())
control.setBranchFinished()
......@@ -519,6 +520,7 @@ PC.DoStmt::compile = (compiler) ->
b = compiler.compile(@children[1])
control = compiler.emitChoice()
compiler.emitCondition(b)
compiler.emitSimplePrefix(CCS.internalChannelName)
entry.emitCallProcessFromFrame(compiler, compiler.getProcessFrame())
control.setBranchFinished()
compiler.emitCondition(new PCCUnaryContainer("!", b))
......@@ -556,6 +558,7 @@ PC.ForStmt::compile = (compiler) ->
breaks.push(compiler.emitProcessApplicationPlaceholder())
control.setBranchFinished()
compiler.emitCondition(b)
compiler.emitSimplePrefix(CCS.internalChannelName)
breaks = breaks.concat(compiler.compile(@body, entry))
entry.emitCallProcessFromFrame(compiler, compiler.getProcessFrame())
......
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