From 041512fe053fd115c79333e167d7071856a0c17e Mon Sep 17 00:00:00 2001 From: Neelesh Chandola Date: Wed, 12 Dec 2018 20:54:50 +0530 Subject: [PATCH] Nim strings do not require copy in JS codegen' --- compiler/jsgen.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim index 4d22c4224d40..0e36b7c4b9c0 100644 --- a/compiler/jsgen.nim +++ b/compiler/jsgen.nim @@ -945,7 +945,7 @@ proc needsNoCopy(p: PProc; y: PNode): bool = else: return (mapType(y.typ) != etyBaseIndex and (skipTypes(y.typ, abstractInst).kind in - {tyRef, tyPtr, tyLent, tyVar, tyCString, tyProc} + IntegralTypes)) + {tyRef, tyPtr, tyLent, tyVar, tyString, tyCString, tyProc} + IntegralTypes)) return true proc genAsgnAux(p: PProc, x, y: PNode, noCopyNeeded: bool) =