Avoid extra copy in JS when inserting.

This commit is contained in:
Yuriy Glukhov
2015-10-15 17:59:23 +03:00
parent 955954a89f
commit e7918fe6e5

View File

@@ -1411,7 +1411,7 @@ proc insert*[T](x: var seq[T], item: T, i = 0.Natural) {.noSideEffect.} =
defaultImpl()
else:
when defined(js):
var it = item
var it : T
{.emit: "`x`[`x`_Idx].splice(`i`, 0, `it`);".}
else:
defaultImpl()