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

Function fxFromBigUint64

xs/sources/xsBigInt.c:895–910  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

893}
894
895void fxFromBigUint64(txMachine* the, txSlot* slot, txU8 value)
896{
897 if (value > 0x00000000FFFFFFFFll) {
898 slot->value.bigint.data = fxNewChunk(the, 2 * sizeof(txU4));
899 slot->value.bigint.data[0] = (txU4)(value);
900 slot->value.bigint.data[1] = (txU4)(value >> 32);
901 slot->value.bigint.size = 2;
902 }
903 else {
904 slot->value.bigint.data = fxNewChunk(the, sizeof(txU4));
905 slot->value.bigint.data[0] = (txU4)value;
906 slot->value.bigint.size = 1;
907 }
908 slot->value.bigint.sign = 0;
909 slot->kind = XS_BIGINT_KIND;
910}
911
912#endif
913

Callers 6

xs_directorystorage_readFunction · 0.85
xs_directorystorage_readFunction · 0.85
xs_directorystorage_readFunction · 0.85
xs_storage_domain_readFunction · 0.85
xsffi.cFile · 0.85
fxBigUint64GetterFunction · 0.85

Calls 1

fxNewChunkFunction · 0.85

Tested by

no test coverage detected