This commit is contained in:
Araq 2014-12-24 13:02:58 +01:00
commit 2be3f501a1
6 changed files with 39 additions and 14 deletions

View file

@ -601,15 +601,13 @@ proc genTry(p: PProc, n: PNode, r: var TCompRes) =
if p.target == targetJS:
app(p.body, "} finally {" & tnl & "excHandler = excHandler.prev;" & tnl)
if i < length and n.sons[i].kind == nkFinally:
gen(p, n.sons[i].sons[0], a)
moveInto(p, a, r)
genStmt(p, n.sons[i].sons[0])
if p.target == targetJS:
app(p.body, "}" & tnl)
if p.target == targetLua:
# we need to repeat the finally block for Lua ...
if i < length and n.sons[i].kind == nkFinally:
gen(p, n.sons[i].sons[0], a)
moveInto(p, a, r)
genStmt(p, n.sons[i].sons[0])
proc genRaiseStmt(p: PProc, n: PNode) =
genLineDir(p, n)