MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxWriteChunkTable

Function fxWriteChunkTable

xs/sources/xsSnapshot.c:2049–2061  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2047}
2048
2049void fxWriteChunkTable(txMachine* the, txSnapshot* snapshot, txSlot** address, txSize length)
2050{
2051 txChunk* chunk = (txChunk*)(((txByte*)(address)) - sizeof(txChunk));
2052 if (chunk->size & mxChunkFlag) {
2053 txByte* temporary = chunk->temporary;
2054 chunk->size &= ~mxChunkFlag;
2055 chunk->temporary = C_NULL;
2056 mxThrowIf((*snapshot->write)(snapshot->stream, chunk, sizeof(txChunk)));
2057 chunk->temporary = temporary;
2058 fxWriteSlotTable(the, snapshot, address, length);
2059 fxWriteChunkZero(the, snapshot, chunk->size - sizeof(txChunk) - (length * sizeof(txSlot*)));
2060 }
2061}
2062
2063void fxWriteChunkZero(txMachine* the, txSnapshot* snapshot, txSize size)
2064{

Callers 1

fxWriteChunkFunction · 0.85

Calls 2

fxWriteSlotTableFunction · 0.85
fxWriteChunkZeroFunction · 0.85

Tested by

no test coverage detected