** (Re)insert all elements from the hash part of 'ot' into table 't'. */
| 462 | ** (Re)insert all elements from the hash part of 'ot' into table 't'. |
| 463 | */ |
| 464 | static void reinsert (lua_State *L, Table *ot, Table *t) { |
| 465 | int j; |
| 466 | int size = sizenode(ot); |
| 467 | for (j = 0; j < size; j++) { |
| 468 | Node *old = gnode(ot, j); |
| 469 | if (!isempty(gval(old))) { |
| 470 | /* doesn't need barrier/invalidate cache, as entry was |
| 471 | already present in the table */ |
| 472 | TValue k; |
| 473 | getnodekey(L, &k, old); |
| 474 | setobjt2t(L, luaH_set(L, t, &k), gval(old)); |
| 475 | } |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | |
| 480 | /* |
no test coverage detected