diff options
-rw-r--r-- | compiler/jsgen.nim | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim index f4d43ce0c..76b8121bf 100644 --- a/compiler/jsgen.nim +++ b/compiler/jsgen.nim @@ -2502,21 +2502,19 @@ proc newModule(g: ModuleGraph; module: PSym): BModule = result.config = g.config proc genHeader(): Rope = - result = ( - "/* Generated by the Nim Compiler v$1 */$n" & - "/* (c) " & copyrightYear & " Andreas Rumpf */$n$n" & - "var framePtr = null;$n" & - "var excHandler = 0;$n" & - "var lastJSError = null;$n" & - "if (typeof Int8Array === 'undefined') Int8Array = Array;$n" & - "if (typeof Int16Array === 'undefined') Int16Array = Array;$n" & - "if (typeof Int32Array === 'undefined') Int32Array = Array;$n" & - "if (typeof Uint8Array === 'undefined') Uint8Array = Array;$n" & - "if (typeof Uint16Array === 'undefined') Uint16Array = Array;$n" & - "if (typeof Uint32Array === 'undefined') Uint32Array = Array;$n" & - "if (typeof Float32Array === 'undefined') Float32Array = Array;$n" & - "if (typeof Float64Array === 'undefined') Float64Array = Array;$n") % - [rope(VersionAsString)] + result = rope("""/* Generated by the Nim Compiler v$1 */ + var framePtr = null; + var excHandler = 0; + var lastJSError = null; + if (typeof Int8Array === 'undefined') Int8Array = Array; + if (typeof Int16Array === 'undefined') Int16Array = Array; + if (typeof Int32Array === 'undefined') Int32Array = Array; + if (typeof Uint8Array === 'undefined') Uint8Array = Array; + if (typeof Uint16Array === 'undefined') Uint16Array = Array; + if (typeof Uint32Array === 'undefined') Uint32Array = Array; + if (typeof Float32Array === 'undefined') Float32Array = Array; + if (typeof Float64Array === 'undefined') Float64Array = Array; + """.unindent.format(VersionAsString)) proc addHcrInitGuards(p: PProc, n: PNode, moduleLoadedVar: Rope, inInitGuard: var bool) = |