first steps in adding template/macro calls to stack traces

This commit is contained in:
Araq
2017-12-21 10:03:33 +01:00
parent 2775cda6e1
commit ee67a67ac4
17 changed files with 96 additions and 38 deletions

View File

@@ -70,6 +70,18 @@ proc getFrame*(): PFrame {.compilerRtl, inl.} = framePtr
proc popFrame {.compilerRtl, inl.} =
framePtr = framePtr.prev
when false:
proc popFrameOfAddr(s: PFrame) {.compilerRtl.} =
var it = framePtr
if it == s:
framePtr = framePtr.prev
else:
while it != nil:
if it == s:
framePtr = it.prev
break
it = it.prev
proc setFrame*(s: PFrame) {.compilerRtl, inl.} =
framePtr = s