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

Function fx_Boolean

xs/sources/xsBoolean.c:63–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63void fx_Boolean(txMachine* the)
64{
65 txBoolean value = (mxArgc > 0) ? fxToBoolean(the, mxArgv(0)) : 0;
66 if (!mxHasTarget) {
67 mxResult->kind = XS_BOOLEAN_KIND;
68 mxResult->value.boolean = value;
69 }
70 else {
71 txSlot* instance;
72 mxPushSlot(mxTarget);
73 fxGetPrototypeFromConstructor(the, &mxBooleanPrototype);
74 instance = fxNewBooleanInstance(the);
75 instance->next->value.boolean = value;
76 mxPullSlot(mxResult);
77 }
78}
79
80void fx_Boolean_prototype_toString(txMachine* the)
81{

Callers

nothing calls this directly

Calls 3

fxToBooleanFunction · 0.85
fxNewBooleanInstanceFunction · 0.85

Tested by

no test coverage detected