Merge pull request #3990 from yglukhov/js-tables-fix

Fixed Table::del in JS
This commit is contained in:
Andreas Rumpf
2016-03-22 13:42:23 +01:00

View File

@@ -129,4 +129,7 @@ template delImpl() {.dirty, immediate.} =
r = t.data[i].hcode and msk # "home" location of key@i
if not ((i >= r and r > j) or (r > j and j > i) or (j > i and i >= r)):
break
shallowCopy(t.data[j], t.data[i]) # data[j] will be marked EMPTY next loop
when defined(js):
t.data[j] = t.data[i]
else:
shallowCopy(t.data[j], t.data[i]) # data[j] will be marked EMPTY next loop