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

Function fxCheckCompartmentInstance

xs/sources/xsModule.c:2839–2849  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2837/* COMPARTMENT */
2838
2839txSlot* fxCheckCompartmentInstance(txMachine* the, txSlot* slot)
2840{
2841 if (slot->kind == XS_REFERENCE_KIND) {
2842 txSlot* instance = slot->value.reference;
2843 if (((slot = instance->next)) && (slot->flag & XS_INTERNAL_FLAG) && (slot->kind == XS_PROGRAM_KIND)) {
2844 return instance;
2845 }
2846 }
2847 mxTypeError("this: not a Compartment instance");
2848 return C_NULL;
2849}
2850
2851void fxPrepareCompartmentFunction(txMachine* the, txSlot* program, txSlot* instance)
2852{

Calls

no outgoing calls

Tested by

no test coverage detected