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

Function fxCheckMetering

xs/sources/xsRun.c:4475–4490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4473}
4474
4475void fxCheckMetering(txMachine* the)
4476{
4477 txU8 interval = the->meterInterval;
4478 the->meterInterval = 0;
4479 if ((*the->meterCallback)(the, the->meterIndex >> 16)) {
4480 the->meterCount = the->meterIndex + interval;
4481 if (the->meterCount < the->meterIndex) {
4482 the->meterIndex = 0;
4483 the->meterCount = interval;
4484 }
4485 the->meterInterval = interval;
4486 }
4487 else {
4488 fxAbort(the, XS_TOO_MUCH_COMPUTATION_EXIT);
4489 }
4490}
4491#endif
4492
4493void fxRunArguments(txMachine* the, txIndex offset)

Callers 2

fxCheckMeterFunction · 0.85
fxMatchRegExpFunction · 0.85

Calls 1

fxAbortFunction · 0.70

Tested by

no test coverage detected