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

Function fxPushAtomicsValue

xs/sources/xsAtomics.c:317–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315}
316
317void fxPushAtomicsValue(txMachine* the, int i, txID id)
318{
319 txSlot* slot;
320 if (mxArgc > i)
321 mxPushSlot(mxArgv(i));
322 else
323 mxPushUndefined();
324 slot = the->stack;
325 if ((id == _BigInt64Array) || (id == _BigUint64Array))
326 fxBigIntCoerce(the, slot);
327 else if (XS_INTEGER_KIND != slot->kind) {
328 txNumber value;
329 fxNumberCoerce(the, slot);
330 value = c_trunc(slot->value.number);
331 if (c_isnan(value) || (value == -0))
332 value = 0;
333 slot->value.number = value;
334 }
335}
336
337
338void fx_SharedArrayBuffer(txMachine* the)

Callers 10

fx_Atomics_addFunction · 0.85
fx_Atomics_andFunction · 0.85
fx_Atomics_exchangeFunction · 0.85
fx_Atomics_orFunction · 0.85
fx_Atomics_storeFunction · 0.85
fx_Atomics_subFunction · 0.85
fx_Atomics_waitFunction · 0.85
fx_Atomics_waitAsyncFunction · 0.85
fx_Atomics_xorFunction · 0.85

Calls 2

fxBigIntCoerceFunction · 0.85
fxNumberCoerceFunction · 0.85

Tested by

no test coverage detected