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

Function fxNewModuleStuffInstance

xs/sources/xsModule.c:3588–3610  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3586}
3587
3588txSlot* fxNewModuleStuffInstance(txMachine* the)
3589{
3590 txSlot* instance;
3591 txSlot* slot;
3592 txSlot* modules;
3593 instance = fxNewSlot(the);
3594 instance->kind = XS_INSTANCE_KIND;
3595 instance->value.instance.garbage = C_NULL;
3596 instance->value.instance.prototype = the->stack->value.reference;
3597 the->stack->kind = XS_REFERENCE_KIND;
3598 the->stack->value.reference = instance;
3599 /* HOST */
3600 slot = instance->next = fxNewSlot(the);
3601 slot->flag = XS_INTERNAL_FLAG;
3602 slot->kind = XS_MODULE_STUFF_KIND;
3603 /* MODULE */
3604 slot = fxNextNullProperty(the, slot, XS_NO_ID, XS_INTERNAL_FLAG);
3605 /* MODULES */
3606 modules = fxNewInstance(the);
3607 slot = fxNextReferenceProperty(the, slot, modules, XS_NO_ID, XS_INTERNAL_FLAG);
3608 mxPop();
3609 return instance;
3610}
3611
3612void fx_ModuleStuff(txMachine* the)
3613{

Callers 1

fx_ModuleStuffFunction · 0.85

Calls 4

fxNewSlotFunction · 0.85
fxNextNullPropertyFunction · 0.85
fxNewInstanceFunction · 0.85
fxNextReferencePropertyFunction · 0.85

Tested by

no test coverage detected