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

Function fxNew

xs/sources/xsAPI.c:1200–1215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1198}
1199
1200void fxNew(txMachine* the)
1201{
1202 txSlot* constructor = the->stack;
1203 txSlot* slot = constructor - 4;
1204 the->stack = slot;
1205 // FRAME
1206 mxInitSlotKind(slot++, XS_UNINITIALIZED_KIND);
1207 // RESULT
1208 mxInitSlotKind(slot++, XS_UNDEFINED_KIND);
1209 // FUNCTION (copy of constructor)
1210 slot->value = constructor->value;
1211 mxInitSlotKind(slot++, constructor->kind);
1212 // THIS (uninitialized marks as constructor)
1213 mxInitSlotKind(slot++, XS_UNINITIALIZED_KIND);
1214 // TARGET (constructor = new.target, stays in place)
1215}
1216
1217void fxNewID(txMachine* the, txID theID)
1218{

Callers 7

mainFunction · 0.85
PiuTextLinkDictionaryFunction · 0.85
PiuContentDictionaryFunction · 0.85
ServiceEventCreateFunction · 0.85
Piu__jsx__Function · 0.85
fxNewIDFunction · 0.85
fxNewFrameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected