diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2014-08-11 20:47:38 +0100 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@googlemail.com> | 2014-08-11 20:47:38 +0100 |
commit | 25610a2f704db32784d52b96118f164cb5113632 (patch) | |
tree | bb0b1710405d3f574bd2a67798e4d110bf4bf49f /compiler/vmdef.nim | |
parent | aaf4b04203221a350198748bc041d81cd5969ccc (diff) | |
download | Nim-25610a2f704db32784d52b96118f164cb5113632.tar.gz |
Fixes incorrect macro stack traces.
Diffstat (limited to 'compiler/vmdef.nim')
-rw-r--r-- | compiler/vmdef.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/vmdef.nim b/compiler/vmdef.nim index 873d8eebd..cad48abea 100644 --- a/compiler/vmdef.nim +++ b/compiler/vmdef.nim @@ -188,6 +188,7 @@ type features*: TSandboxFlags traceActive*: bool loopIterations*: int + comesFromHeuristic*: TLineInfo # Heuristic for better macro stack traces TPosition* = distinct int @@ -196,7 +197,8 @@ type proc newCtx*(module: PSym): PCtx = PCtx(code: @[], debug: @[], globals: newNode(nkStmtListExpr), constants: newNode(nkStmtList), types: @[], - prc: PProc(blocks: @[]), module: module, loopIterations: MaxLoopIterations) + prc: PProc(blocks: @[]), module: module, loopIterations: MaxLoopIterations, + comesFromHeuristic: unknownLineInfo()) proc refresh*(c: PCtx, module: PSym) = c.module = module |