| 491 | } |
| 492 | |
| 493 | void fxArrayCacheEnd(txMachine* the, txSlot* reference) |
| 494 | { |
| 495 | txSlot* array = reference->value.reference->next; |
| 496 | txIndex length = array->value.array.length; |
| 497 | if (length) { |
| 498 | txSlot *srcSlot, *dstSlot; |
| 499 | array->value.array.address = (txSlot*)fxNewChunk(the, fxMultiplyChunkSizes(the, length, sizeof(txSlot))); |
| 500 | srcSlot = array->next; |
| 501 | dstSlot = array->value.array.address + length; |
| 502 | while (srcSlot) { |
| 503 | dstSlot--; |
| 504 | length--; |
| 505 | dstSlot->next = C_NULL; |
| 506 | dstSlot->ID = XS_NO_ID; |
| 507 | dstSlot->flag = XS_NO_FLAG; |
| 508 | dstSlot->kind = srcSlot->kind; |
| 509 | dstSlot->value = srcSlot->value; |
| 510 | *((txIndex*)dstSlot) = length; |
| 511 | srcSlot = srcSlot->next; |
| 512 | } |
| 513 | array->next = C_NULL; |
| 514 | } |
| 515 | } |
| 516 | |
| 517 | void fxArrayCacheItem(txMachine* the, txSlot* reference, txSlot* item) |
| 518 | { |
no test coverage detected