** (Re)insert all elements from the hash part of 'ot' into table 't'. */
| 495 | ** (Re)insert all elements from the hash part of 'ot' into table 't'. |
| 496 | */ |
| 497 | static void reinsert (lua_State *L, Table *ot, Table *t) { |
| 498 | int j; |
| 499 | int size = sizenode(ot); |
| 500 | for (j = 0; j < size; j++) { |
| 501 | Node *old = gnode(ot, j); |
| 502 | if (!isempty(gval(old))) { |
| 503 | /* doesn't need barrier/invalidate cache, as entry was |
| 504 | already present in the table */ |
| 505 | TValue k; |
| 506 | getnodekey(L, &k, old); |
| 507 | luaH_set(L, t, &k, gval(old)); |
| 508 | } |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | |
| 513 | /* |
no test coverage detected