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

Function fxNewModuleSourceInstance

xs/sources/xsModule.c:3221–3254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3219}
3220
3221txSlot* fxNewModuleSourceInstance(txMachine* the)
3222{
3223 txSlot* instance;
3224 txSlot* slot;
3225 instance = fxNewSlot(the);
3226 instance->kind = XS_INSTANCE_KIND;
3227 instance->value.instance.garbage = C_NULL;
3228 instance->value.instance.prototype = the->stack->value.reference;
3229 the->stack->kind = XS_REFERENCE_KIND;
3230 the->stack->value.reference = instance;
3231 /* HOST */
3232 slot = instance->next = fxNewSlot(the);
3233 slot->flag = XS_INTERNAL_FLAG;
3234 slot->kind = XS_MODULE_SOURCE_KIND;
3235 slot->value.module.realm = C_NULL;
3236 slot->value.module.id = XS_NO_ID;
3237 /* EXPORTS */
3238 slot = fxNextNullProperty(the, slot, XS_NO_ID, XS_INTERNAL_FLAG);
3239 /* STUFF */
3240 slot = fxNextNullProperty(the, slot, XS_NO_ID, XS_INTERNAL_FLAG);
3241 /* META */
3242 slot = fxNextNullProperty(the, slot, XS_NO_ID, XS_INTERNAL_FLAG);
3243 /* TRANSFERS */
3244 slot = fxNextNullProperty(the, slot, XS_NO_ID, XS_INTERNAL_FLAG);
3245 /* INITIALIZE */
3246 slot = fxNextNullProperty(the, slot, XS_NO_ID, XS_INTERNAL_FLAG);
3247 /* FUNCTION */
3248 slot = fxNextNullProperty(the, slot, XS_NO_ID, XS_INTERNAL_FLAG);
3249 /* HOSTS */
3250 slot = fxNextNullProperty(the, slot, XS_NO_ID, XS_INTERNAL_FLAG);
3251 /* LOADER */
3252 slot = fxNextNullProperty(the, slot, XS_NO_ID, XS_INTERNAL_FLAG);
3253 return instance;
3254}
3255
3256void fxExecuteVirtualModuleSourceImport(txMachine* the)
3257{

Callers 1

fx_ModuleSourceFunction · 0.85

Calls 2

fxNewSlotFunction · 0.85
fxNextNullPropertyFunction · 0.85

Tested by

no test coverage detected