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

Function fxToNumericNumberBinary

xs/sources/xsRun.c:5016–5031  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5014}
5015
5016txBoolean fxToNumericNumberBinary(txMachine* the, txSlot* a, txSlot* b, txBigIntBinary op)
5017{
5018 txBoolean ra = fxToNumericNumber(the, a);
5019 txBoolean rb = fxToNumericNumber(the, b);
5020 if (ra) {
5021 if (rb)
5022 return 1;
5023 mxTypeError("cannot coerce left operand to bigint");
5024 }
5025 else if (rb)
5026 mxTypeError("cannot coerce right operand to bigint");
5027 a->value.bigint = *(*op)(the, C_NULL, &a->value.bigint, &b->value.bigint);
5028 a->kind = XS_BIGINT_KIND;
5029 the->stack = b;
5030 return 0;
5031}
5032
5033void fxRunScript(txMachine* the, txScript* script, txSlot* _this, txSlot* _target, txSlot* closures, txSlot* object, txSlot* module)
5034{

Callers 1

xsRun.cFile · 0.85

Calls 1

fxToNumericNumberFunction · 0.85

Tested by

no test coverage detected