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

Function _xsCall

xs/sources/xsmc.c:171–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171void _xsCall(txMachine *the, txSlot *res, txSlot *self, txUnsigned id, ...)
172{
173 va_list ap;
174 int n;
175 txSlot *v;
176
177 va_start(ap, id);
178 for (n = 0; va_arg(ap, txSlot *) != NULL; n++)
179 ;
180 va_end(ap);
181 mxOverflow(-(n+6));
182 fxPush(*self);
183 fxCallID(the, (txID)id);
184 va_start(ap, id);
185 while ((v = va_arg(ap, txSlot *)) != NULL)
186 fxPush(*v);
187 va_end(ap);
188 fxRunCount(the, n);
189 if (res != NULL)
190 *res = fxPop();
191 else
192 mxPop();
193}
194
195void _xsNew(txMachine *the, txSlot *res, txSlot *self, txUnsigned id, ...)
196{

Callers

nothing calls this directly

Calls 2

fxCallIDFunction · 0.85
fxRunCountFunction · 0.85

Tested by

no test coverage detected