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

Function _xsNew

xs/sources/xsmc.c:195–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193}
194
195void _xsNew(txMachine *the, txSlot *res, txSlot *self, txUnsigned id, ...)
196{
197 va_list ap;
198 int n;
199 txSlot *v;
200
201 va_start(ap, id);
202 for (n = 0; va_arg(ap, txSlot *) != NULL; n++)
203 ;
204 va_end(ap);
205 mxOverflow(-(n+6));
206 fxPush(*self);
207 fxNewID(the, (txID)id);
208 va_start(ap, id);
209 while ((v = va_arg(ap, txSlot *)) != NULL)
210 fxPush(*v);
211 va_end(ap);
212 fxRunCount(the, n);
213 *res = fxPop();
214}
215
216txBoolean _xsTest(txMachine *the, txSlot *v)
217{

Callers

nothing calls this directly

Calls 2

fxNewIDFunction · 0.85
fxRunCountFunction · 0.85

Tested by

no test coverage detected