Skip to content

Commit

Permalink
Nim strings do not require copy in JS codegen'
Browse files Browse the repository at this point in the history
  • Loading branch information
nc-x committed Dec 12, 2018
1 parent a8b53c9 commit 041512f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/jsgen.nim
Expand Up @@ -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) =
Expand Down

0 comments on commit 041512f

Please sign in to comment.