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

Function fxBuildBigInt

xs/sources/xsBigInt.c:76–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74#ifndef mxCompile
75
76void fxBuildBigInt(txMachine* the)
77{
78 txSlot* slot;
79 mxPush(mxObjectPrototype);
80 slot = fxLastProperty(the, fxNewObjectInstance(the));
81 slot = fxNextHostFunctionProperty(the, slot, mxCallback(fx_BigInt_prototype_toString), 0, mxID(_toLocaleString), XS_DONT_ENUM_FLAG);
82 slot = fxNextHostFunctionProperty(the, slot, mxCallback(fx_BigInt_prototype_toString), 0, mxID(_toString), XS_DONT_ENUM_FLAG);
83 slot = fxNextHostFunctionProperty(the, slot, mxCallback(fx_BigInt_prototype_valueOf), 0, mxID(_valueOf), XS_DONT_ENUM_FLAG);
84 slot = fxNextStringXProperty(the, slot, "BigInt", mxID(_Symbol_toStringTag), XS_DONT_ENUM_FLAG | XS_DONT_SET_FLAG);
85 mxBigIntPrototype = *the->stack;
86 slot = fxBuildHostConstructor(the, mxCallback(fx_BigInt), 1, mxID(_BigInt));
87 mxBigIntConstructor = *the->stack;
88 slot = fxLastProperty(the, slot);
89 slot = fxNextHostFunctionProperty(the, slot, mxCallback(fx_BigInt_asIntN), 2, mxID(_asIntN), XS_DONT_ENUM_FLAG);
90 slot = fxNextHostFunctionProperty(the, slot, mxCallback(fx_BigInt_asUintN), 2, mxID(_asUintN), XS_DONT_ENUM_FLAG);
91 slot = fxNextHostFunctionProperty(the, slot, mxCallback(fx_BigInt_bitLength), 1, mxID(_bitLength), XS_DONT_ENUM_FLAG);
92 slot = fxNextHostFunctionProperty(the, slot, mxCallback(fx_BigInt_fromArrayBuffer), 1, mxID(_fromArrayBuffer), XS_DONT_ENUM_FLAG);
93 mxPop();
94}
95
96void fx_BigInt(txMachine* the)
97{

Callers 1

fxCreateMachineFunction · 0.85

Calls 5

fxLastPropertyFunction · 0.85
fxNewObjectInstanceFunction · 0.85
fxNextStringXPropertyFunction · 0.85
fxBuildHostConstructorFunction · 0.85

Tested by

no test coverage detected