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

Function fxModuleDeleteProperty

xs/sources/xsModule.c:2626–2649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2624}
2625
2626txBoolean fxModuleDeleteProperty(txMachine* the, txSlot* instance, txID id, txIndex index)
2627{
2628 if (id == XS_NO_ID)
2629 return 1;
2630 if (fxIsKeySymbol(the, id)) {
2631 return (id == mxID(_Symbol_toStringTag)) ? 0 : 1;
2632 }
2633// if (mxModuleInstanceStatus(instance) < XS_MODULE_STATUS_LINKED) {
2634// mxReferenceError("module not initialized yet");
2635// }
2636// else
2637 {
2638 txSlot* exports = mxModuleInstanceExports(instance);
2639 if (mxIsReference(exports)) {
2640 txSlot* property = exports->value.reference->next;
2641 while (property) {
2642 if (property->ID == id)
2643 return 0;
2644 property = property->next;
2645 }
2646 }
2647 }
2648 return 1;
2649}
2650
2651txSlot* fxModuleFindProperty(txMachine* the, txSlot* instance, txID id, txIndex index)
2652{

Callers

nothing calls this directly

Calls 1

fxIsKeySymbolFunction · 0.85

Tested by

no test coverage detected