diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-05-17 15:21:22 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-05-17 15:21:22 +0200 |
commit | bf6c2c5ccfd33cc8aab53b98dbce0619f8633d84 (patch) | |
tree | bafa67febeed93ac44278d593ca26b1cb22ea32d /compiler/vm.nim | |
parent | 2a7fc84c86c48c6ca6354c8c2f9232c3f1a0b049 (diff) | |
download | Nim-bf6c2c5ccfd33cc8aab53b98dbce0619f8633d84.tar.gz |
preparations of making compiler/msgs.nim free of global variables
Diffstat (limited to 'compiler/vm.nim')
-rw-r--r-- | compiler/vm.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim index 5eb4d70f3..c81f97e43 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -66,7 +66,7 @@ proc stackTraceAux(c: PCtx; x: PStackFrame; pc: int; recursionLimit=100) = stackTraceAux(c, x.next, x.comesFrom, recursionLimit-1) var info = c.debug[pc] # we now use the same format as in system/except.nim - var s = substr(toFilename(info), 0) + var s = substr(toFilename(c.config, info), 0) # this 'substr' prevents a strange corruption. XXX This needs to be # investigated eventually but first attempts to fix it broke everything # see the araq-wip-fixed-writebarrier branch. @@ -1358,7 +1358,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = # c.debug[pc].line.int - countLines(regs[rb].strVal) ? var error: string let ast = parseString(regs[rb].node.strVal, c.cache, c.config, - c.debug[pc].toFullPath, c.debug[pc].line.int, + toFullPath(c.config, c.debug[pc]), c.debug[pc].line.int, proc (conf: ConfigRef; info: TLineInfo; msg: TMsgKind; arg: string) = if error.isNil and msg <= errMax: error = formatMsg(conf, info, msg, arg)) @@ -1373,7 +1373,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = decodeB(rkNode) var error: string let ast = parseString(regs[rb].node.strVal, c.cache, c.config, - c.debug[pc].toFullPath, c.debug[pc].line.int, + toFullPath(c.config, c.debug[pc]), c.debug[pc].line.int, proc (conf: ConfigRef; info: TLineInfo; msg: TMsgKind; arg: string) = if error.isNil and msg <= errMax: error = formatMsg(conf, info, msg, arg)) @@ -1392,7 +1392,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = of opcNGetFile: decodeB(rkNode) let n = regs[rb].node - regs[ra].node = newStrNode(nkStrLit, n.info.toFilename) + regs[ra].node = newStrNode(nkStrLit, toFilename(c.config, n.info)) regs[ra].node.info = n.info regs[ra].node.typ = n.typ of opcNGetLine: |