summary refs log tree commit diff stats
path: root/compiler/jsgen.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-05-17 15:21:22 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-05-17 15:21:22 +0200
commitbf6c2c5ccfd33cc8aab53b98dbce0619f8633d84 (patch)
treebafa67febeed93ac44278d593ca26b1cb22ea32d /compiler/jsgen.nim
parent2a7fc84c86c48c6ca6354c8c2f9232c3f1a0b049 (diff)
downloadNim-bf6c2c5ccfd33cc8aab53b98dbce0619f8633d84.tar.gz
preparations of making compiler/msgs.nim free of global variables
Diffstat (limited to 'compiler/jsgen.nim')
-rw-r--r--compiler/jsgen.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index 25b554f7b..697d01d86 100644
--- a/compiler/jsgen.nim
+++ b/compiler/jsgen.nim
@@ -537,7 +537,7 @@ proc genLineDir(p: PProc, n: PNode) =
   let line = toLinenumber(n.info)
   if optLineDir in p.options:
     lineF(p, "// line $2 \"$1\"$n",
-         [rope(toFilename(n.info)), rope(line)])
+         [rope(toFilename(p.config, n.info)), rope(line)])
   if {optStackTrace, optEndb} * p.options == {optStackTrace, optEndb} and
       ((p.prc == nil) or sfPure notin p.prc.flags):
     useMagic(p, "endb")
@@ -1907,7 +1907,7 @@ proc genProcBody(p: PProc, prc: PSym): Rope =
   if hasFrameInfo(p):
     result = frameCreate(p,
               makeJSString(prc.owner.name.s & '.' & prc.name.s),
-              makeJSString(toFilename(prc.info)))
+              makeJSString(toFilename(p.config, prc.info)))
   else:
     result = nil
   if p.beforeRetNeeded:
@@ -2200,7 +2200,7 @@ proc genModule(p: PProc, n: PNode) =
   if optStackTrace in p.options:
     add(p.body, frameCreate(p,
         makeJSString("module " & p.module.module.name.s),
-        makeJSString(toFilename(p.module.module.info))))
+        makeJSString(toFilename(p.config, p.module.module.info))))
   genStmt(p, n)
   if optStackTrace in p.options:
     add(p.body, frameDestroy(p))
@@ -2262,7 +2262,7 @@ proc myClose(graph: ModuleGraph; b: PPassContext, n: PNode): PNode =
   if passes.skipCodegen(m.config, n): return n
   if sfMainModule in m.module.flags:
     let ext = "js"
-    let f = if globals.classes.len == 0: toFilename(FileIndex m.module.position)
+    let f = if globals.classes.len == 0: toFilename(m.config, FileIndex m.module.position)
             else: "nimsystem"
     let code = wholeCode(graph, m)
     let outfile =