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

Function fxToNumericIntegerBinary

xs/sources/xsRun.c:4979–4994  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4977}
4978
4979txBoolean fxToNumericIntegerBinary(txMachine* the, txSlot* a, txSlot* b, txBigIntBinary op)
4980{
4981 txBoolean ra = fxToNumericInteger(the, a);
4982 txBoolean rb = fxToNumericInteger(the, b);
4983 if (ra) {
4984 if (rb)
4985 return 1;
4986 mxTypeError("cannot coerce left operand to bigint");
4987 }
4988 else if (rb)
4989 mxTypeError("cannot coerce right operand to bigint");
4990 a->value.bigint = *(*op)(the, C_NULL, &a->value.bigint, &b->value.bigint);
4991 a->kind = XS_BIGINT_KIND;
4992 the->stack = b;
4993 return 0;
4994}
4995
4996txBoolean fxToNumericNumber(txMachine* the, txSlot* theSlot)
4997{

Callers 1

xsRun.cFile · 0.85

Calls 1

fxToNumericIntegerFunction · 0.85

Tested by

no test coverage detected