implemented 'injectStmt'; more debug support

This commit is contained in:
Araq 2013-12-16 22:26:17 +01:00
commit 132b6b3efe
12 changed files with 60 additions and 12 deletions

View file

@ -906,7 +906,12 @@ proc genPragma(p: BProc, n: PNode) =
of wEmit: genEmit(p, it)
of wBreakpoint: genBreakPoint(p, it)
of wWatchpoint: genWatchpoint(p, it)
else: nil
of wInjectStmt:
var p = newProc(nil, p.module)
p.options = p.options - {optLineTrace, optStackTrace}
genStmts(p, it.sons[1])
p.module.injectStmt = p.s(cpsStmts)
else: discard
proc FieldDiscriminantCheckNeeded(p: BProc, asgn: PNode): bool =
if optFieldCheck in p.options: