Fixes incorrect macro stack traces.
This commit is contained in:
parent
aaf4b04203
commit
25610a2f70
2 changed files with 13 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue