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

Function fxIsInstanceOf

xs/sources/xsAPI.c:466–484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

464}
465
466txBoolean fxIsInstanceOf(txMachine* the)
467{
468 txBoolean result = 0;
469 txSlot* theInstance = the->stack++;
470 txSlot* thePrototype = the->stack++;
471
472 if (mxIsReference(theInstance) && mxIsReference(thePrototype)) {
473 theInstance = fxGetInstance(the, theInstance);
474 thePrototype = fxGetInstance(the, thePrototype);
475 while (theInstance) {
476 if (theInstance == thePrototype) {
477 result = 1;
478 break;
479 }
480 theInstance = fxGetPrototype(the, theInstance);
481 }
482 }
483 return result;
484}
485
486void fxArrayCacheBegin(txMachine* the, txSlot* reference)
487{

Callers 1

_xsIsInstanceOfFunction · 0.85

Calls 2

fxGetInstanceFunction · 0.85
fxGetPrototypeFunction · 0.85

Tested by

no test coverage detected