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

Function fxBuildBoolean

xs/sources/xsBoolean.c:42–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40static txSlot* fxCheckBoolean(txMachine* the, txSlot* it);
41
42void fxBuildBoolean(txMachine* the)
43{
44 txSlot* slot;
45 mxPush(mxObjectPrototype);
46 slot = fxLastProperty(the, fxNewBooleanInstance(the));
47 slot = fxNextHostFunctionProperty(the, slot, mxCallback(fx_Boolean_prototype_toString), 0, mxID(_toString), XS_DONT_ENUM_FLAG);
48 slot = fxNextHostFunctionProperty(the, slot, mxCallback(fx_Boolean_prototype_valueOf), 0, mxID(_valueOf), XS_DONT_ENUM_FLAG);
49 mxBooleanPrototype = *the->stack;
50 slot = fxBuildHostConstructor(the, mxCallback(fx_Boolean), 1, mxID(_Boolean));
51 mxBooleanConstructor = *the->stack;
52 mxPop();
53}
54
55txSlot* fxNewBooleanInstance(txMachine* the)
56{

Callers 1

fxCreateMachineFunction · 0.85

Calls 4

fxLastPropertyFunction · 0.85
fxNewBooleanInstanceFunction · 0.85
fxBuildHostConstructorFunction · 0.85

Tested by

no test coverage detected