initial version of the new untested destructor pass
This commit is contained in:
parent
078e78d208
commit
ec253ada72
8 changed files with 177 additions and 120 deletions
|
|
@ -235,14 +235,14 @@ proc genTry(c: var Con; n: PNode) =
|
|||
|
||||
proc genRaise(c: var Con; n: PNode) =
|
||||
gen(c, n.sons[0])
|
||||
c.code.add Instr(n: n, kind: goto, dest: high(int))
|
||||
c.code.add Instr(n: n, kind: goto, dest: high(int) - c.code.len)
|
||||
|
||||
proc genReturn(c: var Con; n: PNode) =
|
||||
if n.sons[0].kind != nkEmpty: gen(c, n.sons[0])
|
||||
c.code.add Instr(n: n, kind: goto, dest: high(int))
|
||||
c.code.add Instr(n: n, kind: goto, dest: high(int) - c.code.len)
|
||||
|
||||
const
|
||||
InterestingSyms = {skVar, skResult}
|
||||
InterestingSyms = {skVar, skResult, skLet}
|
||||
|
||||
proc genUse(c: var Con; n: PNode) =
|
||||
var n = n
|
||||
|
|
@ -279,7 +279,7 @@ proc genMagic(c: var Con; n: PNode; m: TMagic) =
|
|||
for i in 2..<n.len: gen(c, n[i])
|
||||
of mExit:
|
||||
genCall(c, n)
|
||||
c.code.add Instr(n: n, kind: goto, dest: high(int))
|
||||
c.code.add Instr(n: n, kind: goto, dest: high(int) - c.code.len)
|
||||
else:
|
||||
genCall(c, n)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue