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

Function fxToBigUint64

xs/sources/xsBigInt.c:694–705  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

692}
693
694txU8 fxToBigUint64(txMachine* the, txSlot* slot)
695{
696 txBigInt* bigint = fxToBigInt(the, slot, 1);
697 txU8 result = bigint->data[0];
698 if (bigint->size > 1)
699 result |= (txU8)(bigint->data[1]) << 32;
700 if (bigint->sign && result) {
701 result--;
702 result = 0xFFFFFFFFFFFFFFFFll - result;
703 }
704 return result;
705}
706
707txBigInt* fxIntegerToBigInt(txMachine* the, txSlot* slot)
708{

Callers 7

xs_storage_domain_writeFunction · 0.85
xsffi.cFile · 0.85
fxToBigInt64Function · 0.85
fxBigUint64SetterFunction · 0.85

Calls 1

fxToBigIntFunction · 0.85

Tested by

no test coverage detected