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

Function fxIsFunction

xs/sources/xsFunction.c:114–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114txBoolean fxIsFunction(txMachine* the, txSlot* instance)
115{
116again:
117 if (instance) {
118 txSlot* exotic = instance->next;
119 if (exotic && (exotic->flag & XS_INTERNAL_FLAG)) {
120 if (((exotic->kind == XS_CALLBACK_KIND) || (exotic->kind == XS_CALLBACK_X_KIND) || (exotic->kind == XS_CODE_KIND) || (exotic->kind == XS_CODE_X_KIND)))
121 return 1;
122 if (exotic->kind == XS_PROXY_KIND) {
123 instance = exotic->value.proxy.target;
124 goto again;
125 }
126 }
127 }
128 return 0;
129}
130
131txSlot* fxNewFunctionInstance(txMachine* the, txID name)
132{

Callers 2

fxCheckFunctionInstanceFunction · 0.85
fxIsCallableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected