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

Function fxNewGeneratorFunctionInstance

xs/sources/xsGenerator.c:1382–1395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1380}
1381
1382txSlot* fxNewGeneratorFunctionInstance(txMachine* the, txID name)
1383{
1384 txSlot* instance;
1385 txSlot* property;
1386
1387 instance = fxNewFunctionInstance(the, name);
1388 property = fxLastProperty(the, instance);
1389 mxPush(mxGeneratorPrototype);
1390 fxNewObjectInstance(the);
1391 fxNextSlotProperty(the, property, the->stack, mxID(_prototype), XS_DONT_DELETE_FLAG | XS_DONT_ENUM_FLAG);
1392 mxPop();
1393
1394 return instance;
1395}
1396
1397void fx_GeneratorFunction(txMachine* the)
1398{

Callers

nothing calls this directly

Calls 4

fxNewFunctionInstanceFunction · 0.85
fxLastPropertyFunction · 0.85
fxNewObjectInstanceFunction · 0.85
fxNextSlotPropertyFunction · 0.85

Tested by

no test coverage detected