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

Function fxNewIteratorInstance

xs/sources/xsGenerator.c:355–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355txSlot* fxNewIteratorInstance(txMachine* the, txSlot* iterable, txID id)
356{
357 txSlot* instance;
358 txSlot* result;
359 txSlot* property;
360 instance = fxNewObjectInstance(the);
361 mxPush(mxObjectPrototype);
362 result = fxNewObjectInstance(the);
363 property = fxNextUndefinedProperty(the, result, mxID(_value), XS_DONT_DELETE_FLAG | XS_DONT_SET_FLAG);
364 property = fxNextBooleanProperty(the, property, 0, mxID(_done), XS_DONT_DELETE_FLAG | XS_DONT_SET_FLAG);
365 property = fxNextSlotProperty(the, instance, the->stack, id, XS_INTERNAL_FLAG);
366 property = fxNextSlotProperty(the, property, iterable, XS_NO_ID, XS_INTERNAL_FLAG);
367 property = fxNextIntegerProperty(the, property, 0, XS_NO_ID, XS_INTERNAL_FLAG);
368 mxPop();
369 return instance;
370}
371
372void fxSetterThatIgnoresPrototypeProperties(txMachine* the, txSlot* reference, txID id, txString name, txSlot* value)
373{

Callers 13

fxNewMapIteratorInstanceFunction · 0.85
fxNewSetIteratorInstanceFunction · 0.85
fx_Iterator_fromFunction · 0.85
fx_Array_fromAsyncFunction · 0.85
fx_Array_prototype_keysFunction · 0.85

Calls 5

fxNewObjectInstanceFunction · 0.85
fxNextUndefinedPropertyFunction · 0.85
fxNextBooleanPropertyFunction · 0.85
fxNextSlotPropertyFunction · 0.85
fxNextIntegerPropertyFunction · 0.85

Tested by

no test coverage detected