Workaround "move not found" exception in JS when using tables. (#11256)
This commit is contained in:
parent
95f8ed0382
commit
6b2ed28d55
1 changed files with 4 additions and 1 deletions
|
|
@ -274,6 +274,9 @@ proc enlarge[A, B](t: var Table[A, B]) =
|
||||||
var j: Hash = eh and maxHash(t)
|
var j: Hash = eh and maxHash(t)
|
||||||
while isFilled(t.data[j].hcode):
|
while isFilled(t.data[j].hcode):
|
||||||
j = nextTry(j, maxHash(t))
|
j = nextTry(j, maxHash(t))
|
||||||
|
when defined(js):
|
||||||
|
rawInsert(t, t.data, n[i].key, n[i].val, eh, j)
|
||||||
|
else:
|
||||||
rawInsert(t, t.data, move n[i].key, move n[i].val, eh, j)
|
rawInsert(t, t.data, move n[i].key, move n[i].val, eh, j)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue