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

Function fxInsertDecomposition

xs/sources/xsString.c:3500–3511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3498}
3499
3500void fxInsertDecomposition(txMachine* the, txNormalizeBuffer* buffer, txInteger at, txInteger code)
3501{
3502 txInteger resultLength = fxGetArrayBufferLength(the, buffer->slot);
3503 if (buffer->count == resultLength >> 2) {
3504 fxSetArrayBufferLength(the, the->stack, resultLength + 64);
3505 buffer->address = fxToArrayBuffer(the, the->stack);
3506 }
3507 if (at < buffer->count)
3508 c_memmove(buffer->address + at + 1, buffer->address + at, (buffer->count - at) << 2);
3509 buffer->address[at] = code;
3510 buffer->count++;
3511}
3512
3513void fxNormalizeComposition(txMachine* the, txNormalizeBuffer* buffer)
3514{

Callers 1

fxNormalizeDecompositionFunction · 0.85

Calls 3

fxGetArrayBufferLengthFunction · 0.85
fxSetArrayBufferLengthFunction · 0.85
fxToArrayBufferFunction · 0.85

Tested by

no test coverage detected